Module: SvgDocument::HasTranslation
- Included in:
- Base
- Defined in:
- lib/gamebox/core/svg_document.rb
Instance Method Summary collapse
Instance Method Details
#translation ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/gamebox/core/svg_document.rb', line 41 def translation transform = @node.attributes["transform"] if transform and transform =~ /translate\(\s*(.+?)\s*,\s*(.+?\)\s*)/ vec2($1.to_f, ty = $2.to_f) else ZERO_VEC_2 end end |