Open mindbrix opened 6 years ago
This is nice !
On closer inspection, attribute parsing needs to be element specific is some cases, e.g. x and y for
Also, transforms attributes need priority for
Such picture? :)
Yes. Fixed, but it needs more work.
https://github.com/memononen/nanosvg/pull/131/commits/f8d80bc7c5554b535f30ea03faeee6cc843892fe fixes rects while still supporting x and y attributes for the svg element
OK. One moment else. Should we perform parsing "transform" after parsing "x" and "y" in nsvg__parseAttr? The order is significant.
O, I see you already said this "Also, transforms attributes need priority for (and possible others), but they are currently parsed in the order they are found." Somehow reorder attributes?
Or just don't multiply matrices until parseAttr will finish.
@SergeySlice my analysis was incorrect. The problem was that for rects the x and y attributes were being consumed twice and concatenating an unnecessary translation. This is now fixed.
All is good now.
Hi. This fixes the attached SVG.
material_design_icons.svg.zip