bodoni / svg

Composer and parser for SVG
Other
302 stars 44 forks source link

svg regards the first event of a regular move event as a "relative" move #14

Closed fschutt closed 6 years ago

fschutt commented 6 years ago

If I have a SVG triangle with: d="m 58.966213,150.22576 6.60165,-67.629055 55.267647,39.531725 z", the svg parser submits three Command::Relative. However, the first event should be an Command::Absolute, event, only the following are Command::Relative events.

I.e. I get this:

Move(Relative, Parameters([58.966213, 150.22575, 6.60165, -67.62905, 55.267647, 39.531727]))
Close

What would be correct:

Move(Absolute, Parameters([58.966213, 150.22575]))
Move(Relative, Parameters([6.60165, -67.62905, 55.267647, 39.531727]))
Close
fschutt commented 6 years ago

Forget it, the SVG spec says otherwise. It's something with my SVG file.