memononen/nanosvg — pull request #8 by bryanmcconkey (2014-02-23 14:14:16+00:00)
Title: Fix for transforms on path elements

Fix for transforms on path elements with 'transform' attributes which appear after the path data 'd' attributes but should still apply to the path.

In some exports, specifically from Inkscape (http://www.inkscape.org) I have seen a bunch of cases where the path element itself has a 'transform' attribute. The transform attribute appears after the 'd' attribute, but is still associated with, and thus should apply to the values from the 'd' attribute data.

Example:

In this case nanosvg would not apply the transform to the values in 'd'. I made a change to always parse the 'd' attribute last, after all transforms in the path element. This fixed the errors I have seen and made the read node values consistent with the data I expect from the export.