fix: group abs_transform should only need to apply transform once#1037
Draft
fundon wants to merge 4 commits intolinebender:mainfrom
Draft
fix: group abs_transform should only need to apply transform once#1037fundon wants to merge 4 commits intolinebender:mainfrom
fundon wants to merge 4 commits intolinebender:mainfrom
Conversation
78fd3dc to
1df4c36
Compare
LaurenzV
reviewed
Mar 19, 2026
crates/resvg/tests/tests/structure/use/with-transform-in-use.svg
Outdated
Show resolved
Hide resolved
4f8261a to
ccbbc68
Compare
ccbbc68 to
10b2658
Compare
Collaborator
Collaborator
|
I agree that a scale of 0.25 does seem wrong here, but I'm not sure if the fix you applied is the right one. |
Author
|
Let me check the context. Thank you. |
Collaborator
|
If it does not affect |
Author
I have no clue. Is it an error caused by the latest |
Collaborator
|
Can you try restoring the old snapshots and see whether tests still pass? |
Author
Tried. These use cases all have several pixel differences. |
Collaborator
|
Ah ok. Well, I haven't gotten to reviewing this yet, but if it's just a very small diff it's probably fine and due to some floating-point stuff. |
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.
If there is
transformon theuseelement, theabs_transformon the group will be applied transform twice.This will not cause problems in
resvgrendering, but if it is parsed throughusvg, theabs_transformobtained is incorrect, which will cause the custom rendering to be incorrect.The correct
scaleshould be 0.5, not 0.25.resvg/crates/usvg/src/parser/use_node.rs
Lines 273 to 274 in 3a0fdba
resvg/crates/usvg/src/parser/converter.rs
Line 768 in 3a0fdba