pents90 / svg-android

Support for scalable vector graphics in Android
773 stars 367 forks source link

Exception on parsing transform with exponent notation #9

Open vicctor opened 11 years ago

vicctor commented 11 years ago

I noticed such problem when parsing this file: https://commons.wikimedia.org/wiki/File:G-clef.svg

The library is unable to parse numbers like 2.00e-1

vicctor commented 11 years ago

Above commit fixes the problem and it looks like the clef SVG is parsed correctly. But because I'm new with the SVG specification, I'm not really sure if the current approach good at all. I will place some comments in source tree to let discuss the meaning of the code.

vicctor commented 11 years ago

@pents90 I'm wondering what is the big case in line 213 (see commit above) good for? SVG spec does not say anything about these chars in the transform element. The list of number shall ends with ) always. Is this a workaround for some special-undocumented feature?

vicctor commented 11 years ago

I realised today that the clef.svg image is not rendered even with my fix.