regebro / svg.path

SVG path objects and parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in parser.py

pshevchenko01 opened this issue · comments

There in an error in parser.py around line 45.
For implicit command, last_command should be set to command.
Otherwise, control point for QubicBezier will be set incorrectly, if for example, first command was 'M'

That makes sense. Can you give an example path where this happens so I can add a test?

Adding this breaks nothing, but I still would like an example.

"M 100 250 S 200 200 200 250 300 300 300 250" -- Not that 3 years late is a thing. This same error kicked up in svgpathtools which branched from an older version of this.

mathandy/svgpathtools#99 turns out the svg test suite contains exactly such a path.