Skip to content

Fix rendering of filters with skews and rotations - #1155

Open
LaurenzV wants to merge 1 commit into
mainfrom
filters-in-user-space
Open

LaurenzV wants to merge 1 commit into
mainfrom
filters-in-user-space

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Supersedes #1081. When investigating this PR, I realized that the problem is more generally that resvg handles skewed filter layers incorrectly.

What we do now is: We "absorb" the skewing/rotation factor from the filter layer, draw it purely with the scale/translation, and then skew/rotate the filtered bitmap when drawing it. This fixes a lot of test cases! All images render the same as in Chrome, except for one where there seemingly is a small issue, but probably unrelated.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Chrome looks a bit different, the bottom row seems to be cut off? But the skewing itself matches now.

@LaurenzV
LaurenzV requested a review from nicoburns October 9, 2026 16:01
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