Canvas SVG: Difference between revisions

Jump to navigation Jump to search
Line 21: Line 21:


Also, it's not a totally new dependency, rather just another OSG plugin - so comparatively easy to support via the existing build system (according to the OSG website, the plugin only needs librsvg)
Also, it's not a totally new dependency, rather just another OSG plugin - so comparatively easy to support via the existing build system (according to the OSG website, the plugin only needs librsvg)
[...]
Actually, it only just occurred to me that we may already have native SVG support anyway, due to the way how OSG ReaderWriter plugins work, it's very well possible that all that we need to do is build/add the SVG plugin, because at that point Canvas.Image might automatically be able to work "as is", without any C++ changes, all that is needed is specifying an SVG file - how does that sound? :D
(note this bypasses Nasal/svg.nas and the XML parser entirely, and runs inside a background thread handled by OSG, and it only takes a few ms to load/display)


[[File: Svg-via-canvas-image.png|Native SVG handling via [[Canvas Image]] and the OSG SVG plugin (via librsvg)]]
[[File: Svg-via-canvas-image.png|Native SVG handling via [[Canvas Image]] and the OSG SVG plugin (via librsvg)]]

Navigation menu