SVG parsing issue


#1

Hey Jules,

It looks like there’s an issue with parsing SVG files that have the width or height specified using percentages instead of plain integers. When the parser comes across a percentage it just gets 0 and ends up creating a transform of all 0’s. The result of course is no output at all. I get this issue in the tip both in my code and in the Juce Demo.

Here is an SVG that can be used to test:
http://upload.wikimedia.org/wikipedia/commons/archive/d/d5/20110218212415%21Coat_of_arms_of_Bavaria.svg

Thanks


#2

Yes, not too surprising, as when it parses the SVG it has no target size for it to fit into, and no way of representing the fact that it should later on be drawn as a percentage.

There’s nothing I can do to actually use those percentages, but I guess to avoid confusion it could make sure it uses a sensible default size instead of 0 when it encounters that kind of thing… Thanks for letting me know!


#3

ah, sorry, I was talking crap. It can calculate them from the size of the view box… duh.


#4

…no, actually, I just checked the spec, and I was right the first time - a percentage is meaningless in this context, so I’ll just make it use a default size.