feat: add removeCollinear to optimize SVG path data#96
Merged
nfroidure merged 1 commit intonfroidure:mainfrom Jun 16, 2025
Merged
feat: add removeCollinear to optimize SVG path data#96nfroidure merged 1 commit intonfroidure:mainfrom
nfroidure merged 1 commit intonfroidure:mainfrom
Conversation
armano2
commented
Mar 17, 2025
| 'y' in cmd ? cmd.y + (isRelatve ? pYAbs : 0) : pYAbs, | ||
| ]; | ||
| }), | ||
| ); |
Contributor
Author
There was a problem hiding this comment.
i was thinking about using TO_ABS instead but i would also need to normalize HV, and this is easier
technically i could do all of this in single loop, by skipping first 2 points and removing3ht one and updating 2nd one, and i'm not sure if SVGPathDataTransformer.INFO is even needed in here
nfroidure
approved these changes
Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
in theory i could be done differently by removing last point and updating previous one, but regular transformers can't modify previous items and thus it requires all commands
Code quality
License
To get your contribution merged, you must check the following.