Class: Text2Path::SvgPath
- Inherits:
-
Savage::Path
- Object
- Savage::Path
- Text2Path::SvgPath
- Defined in:
- lib/text2path/svg_path.rb
Overview
specification: www.w3.org/TR/SVG/paths.html#PathElement
Attributes:
d
transform (not implemented)
pathLength (not implemented)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse(str) ⇒ Object
16 17 18 19 20 |
# File 'lib/text2path/svg_path.rb', line 16 def parse( str ) Savage::Parser.parse( str ).tap do |p| yield p if block_given? end end |
Instance Method Details
#advance(dx = 0, dy = 0) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/text2path/svg_path.rb', line 23 def advance( dx=0, dy=0 ) subpaths.each do |p| #p.move_to dx, dy p.directions.each do |dir| end end end |