Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong svg parse #473

Open
samuelgja opened this issue Nov 25, 2021 · 1 comment
Open

wrong svg parse #473

samuelgja opened this issue Nov 25, 2021 · 1 comment

Comments

@samuelgja
Copy link

I have mismatch with parsing svgPath...

if I parse('M 0 12.5 L 28 12.5 M 12.5 0 L 12.5 28')

it returns serialized: M 0 12.5 C 0 12.5 28 12.5 28 12.5 C 12.5 0 12.5 28 12.5 28
which is wrong svg.

Currently I looked at the code & if i do const segments: SVGNormalizedCommands = normalizeSVG(absSVG(parseSVG(d)))
& serialize segments back to the string, it work ok. So problem is somewhere else :(

Thanks for help! :)

@wcandillon
Copy link
Owner

Indeed, it normalizes path as a sequence of bezier curves (for interpolation) so it won't return the same commands but the path should look the same when you draw it. does this helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants