Bug 1503 : SVG path parsing doesn't support implicit commands
Last modified: 2010-03-14 10:08




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
Ben S
Assigned To:
fry

Attachment Type Created Size Actions
Test case application/zip 2010-03-11 09:15 898 bytes
Patch to fix described problem patch 2010-03-11 09:16 1.11 KB

Description:   Opened: 2010-03-11 09:15
Sayeth the SVG specification at http://www.w3.org/TR/SVG/paths.html :

"The command letter can be eliminated on subsequent commands if the same
command is used multiple times in a row (e.g., you can drop the second "L"
in "M 100 200 L 200 100 L -100 -200" and use "M 100 200 L 200 100 -100
-200" instead)."

...and...

"If a moveto is followed by multiple pairs of coordinates, the subsequent
pairs are treated as implicit lineto commands."

This is not supported by SVN HEAD Processing, which fails to parse SVG
documents which use this feature (including InkScape with default settings).

A patch is included.
Additional Comment #1 From Ben S 2010-03-11 09:15
edit]
Test case
Additional Comment #2 From Ben S 2010-03-11 09:16
edit]
Patch to fix described problem

NOTE: This patch has not been tested on implicit coordinates for shape types
other than polylines.
Additional Comment #3 From fry 2010-03-14 10:08
awesome, thanks so much for the fix.