Hooray wrote:check the console for errors - our SVG parser is hand-written and only supports a subset of SVG instructions, so may need to be extended, or simply use supported inkscape primitives instead.
Hooray wrote:svg.nas is our existing example on populating a canvas procedurally by parsing an XML file.
Basically, it looks for supported SVG primitives, and turns those into Canvas/OpenVG primitives by setting properties.
Hooray wrote:zakalawe wrote:Does Inkscape support including a layer from another SVG file?). Since I agree being able to position elements visually is very nice.
The SVG standard explicitly suppots referencing other images (including raster images and SVGs) via the "image" tag - even recursively, so I'd be surprised if inkscape didn't support that.
However, our svg parser doesn't currently support this IIRC - but it's "just" Nasal code, so would probably just require ~10-15 lines of code to add support for the image/object tags.
http://docs.webplatform.org/wiki/tutori ... ent_in_svg
Hooray wrote:the svg parser is hand-written and can be found in $FG_ROOT/Nasal/canvas/svg.nas, it can be easily extended to support additional primitives/tags, you just need to map them to the corresponding OpenVG equivalents, I think supporting shapes would make sense and shouldn't be too difficult.
Hooray wrote:VG parser and gradients: I think that text can be separately handled via osgText (which should support gradients/AA etc), but I need to check
Hooray wrote:I think our svg.nas parser could also be extended to support external SVGs directly, i.e. using the <use> and <image> tags. The other concern here is performance - once instruments are self-contained and can be treated as such, we can also update them more selectively, i.e. we don't necessarily have to use timers for each individual element, but can instead update instruments in a holistic fashion.
Hooray wrote in Wed Apr 08, 2015 8:08 pm:Referring to: http://sourceforge.net/p/flightgear/codetickets/1739/
You keep raising this - even though I actually tried to explain what is going on here and what needs to be done to fix this.
Were my postings insufficient or what exactly is the problem ?
Do you need help understanding svg.nas ?
If you're hoping to continue working on your Farmin framework, it would seem like a pretty straightforward thing to extend svg.nas accordingly, while also being really useful.
If in doubt, I'd suggest to review the git changelog of svg.nas to see how it has been previously extended by TheTom, Zakalawe and Torsten.
http://wiki.flightgear.org/Howto:Use_SV ... e_a_Canvas
Users browsing this forum: No registered users and 3 guests