Hello,
according to the
svg specification
the path data does allow upper and lower case characters for commands (e.g. m/M for move) whereas the lowercase means the following coordinates are relative, and uppercase means they are absolute.
InkscapeReader does only support 'M' for example, but inkscape does write out both. Here is a example from a normal inkscape file, which throws a exception:
Code:
<path
style="fill:#0000ff;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.37037036000000001"
d="m 758.92857,485.5 -342.85714,-141.42857 3.57143,-18.92857 347.5,141.42857 z"
id="path3790"
inkscape:connector-curvature="0"
transform="translate(0,284.36218)" />
<path
style="fill:#0000ff;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.37037036"
d="M 326.78571,705.5 673.92857,524.78571 673.21429,545.85714 326.42857,722.28571 z"
id="path3800"
inkscape:connector-curvature="0"
transform="translate(0,284.36218)" />
The exception:
Code:
Caused by: org.newdawn.slick.svg.ParsingException: (path3790) Invalid token in points list
at org.newdawn.slick.svg.inkscape.PolygonProcessor.processPoly(PolygonProcessor.java:70)
at org.newdawn.slick.svg.inkscape.PolygonProcessor.process(PolygonProcessor.java:93)
...
Caused by: java.lang.NumberFormatException: For input string: "m"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Float.parseFloat(Unknown Source)
at org.newdawn.slick.svg.inkscape.PolygonProcessor.processPoly(PolygonProcessor.java:64)
Please also support relative coordinates.
Thank you