Module: Pathby::Pathy

Includes:
Transformations
Included in:
Path
Defined in:
lib/pathby.rb

Instance Method Summary collapse

Methods included from Transformations

#center, #reflect, #rezero, #rotate, #scale, #scale_to, #simplebbox, #transform

Instance Method Details

#allpointsObject



38
39
40
# File 'lib/pathby.rb', line 38

def allpoints
  return self.curves.flatten(1)
end

#toPathDataObject



42
43
44
45
46
47
48
# File 'lib/pathby.rb', line 42

def toPathData
  stra = []
  self.curves.each do |curve|
   stra << " M #{curve[0].toPathData} C #{curve[1..-1].map(&:toPathData).join(" ")}"
 end
  return "#{stra.join(" ")}"
end