rveciana / svg-path-properties

Pure Javascript alternative to path.getPointAtLength(t) and getTotalLength() functions. Works with Canvas & Node
MIT License
256 stars 22 forks source link

set a to 6 (fixes #40) #41

Closed JonnyBurger closed 3 years ago

rveciana commented 3 years ago

Are you sure? The docs say 7 numbers: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths Maybe the first it like the one on the last, but i'm not sure that this is properly coded when calculating stuff...

rveciana commented 3 years ago

Actually, the part is this: a6.69 6.69 0 01-5.1 1.6 There't this 01 which seems to be large-arc-flag sweep-flag together. When separating them in inkscape, I get the same shape. So the fix should be allowing to read the flags when they are together, not saying that a has 6 elements...

JonnyBurger commented 3 years ago

Good call! Thanks for investigating. No I was not sure. This was just a path that was spit out by potrace actually.

So in that case I close this PR as it seems invalid but leave the issue open.