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

Fix a rare crash involving subpath relativity #57

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

jzbrooks
Copy link
Owner

This is super important for calculating relative coordinates for a given subpath and it was totally wrong in a couple spots.

If a "closepath" is followed immediately by a "moveto", then the "moveto" identifies the start point of the next subpath. If a "closepath" is followed immediately by any other command, then the next subpath starts at the same initial point as the current subpath.

https://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand

@jzbrooks jzbrooks merged commit 2e2917d into master Jul 31, 2024
2 checks passed
@jzbrooks jzbrooks deleted the redundant-command-crash branch July 31, 2024 02:56
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

Successfully merging this pull request may close these issues.

1 participant