SVGPath
SVGPath copied to clipboard
Treat further coordinates following moveTo command as lineTo command
As sated here the moveTo command (m/M), when followed by more than one pair of coordinates, assumes the command to be a lineTo (l/L) instead. Currently the library treats it as other moveTo, so it does not draw paths starting with lines. This behaviour is what inkscape does by default, so it is not possible to draw a line from its source directly.
It may be useful to make the code conform to this pattern, as it is the way inkscape saves the
Yeah, looking at https://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands, I see the same thing.
If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute.
Marking as a bug.
Too bad this bug is still open! Android platform has fixed this issue in their code PathParser.java