Canvas SVG parser: Difference between revisions

Jump to navigation Jump to search
m (→‎Known Limitations: Comment about the shapes found in the Vector Graphics Utility Library)
Line 175: Line 175:
* http://www.w3.org/TR/SVG/struct.html#ImageElement
* http://www.w3.org/TR/SVG/struct.html#ImageElement


Shapes are also currently not exposed to Nasal, you'll typically want to use Inkscape's "simplify" option. Basic shapes like Line, Polygon, Rect, RoundedRect, Ellipse and Arc are available through the VGU Utility Library and could be implemented in Nasal directly.
Shapes are also currently not exposed to Nasal, you'll typically want to use Inkscape's "simplify" option. Basic shapes like Line, Polygon, Rect, RoundedRect, Ellipse and Arc are available through the VGU Utility Library and could be implemented in Nasal directly by extending svg.nas to map SVG/XML primitives to the corresponding OpenVG primitives supported by Shiva/ShaderVG.
{{FGCquote
{{FGCquote
   |Learnt the hard way that SVG parsing (for ''svg_path'' in ''AA.symbol'') in FG doesn't recognize ''<circle>'', ''<ellipse>'', etc., so I opened my hand-coded SVG in Inkscape and used ''Path->Simplify'' (which ostensibly converts shapes to paths) to convert it to a code compatible with FG.
   |Learnt the hard way that SVG parsing (for ''svg_path'' in ''AA.symbol'') in FG doesn't recognize ''<circle>'', ''<ellipse>'', etc., so I opened my hand-coded SVG in Inkscape and used ''Path->Simplify'' (which ostensibly converts shapes to paths) to convert it to a code compatible with FG.

Navigation menu