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

compose: Fix SVG scaling with librsvg 2.52 #376

Merged
merged 1 commit into from Jan 20, 2022

Conversation

heftig
Copy link
Contributor

@heftig heftig commented Jan 7, 2022

We should only scale the canvas in the legacy path, since the viewport
already takes care of scaling.

Also, while we're here:

  • We should cairo_save before scaling, so that on error the
    cairo_restore doesn't leave the canvas in the scaled state.
  • The SVG size is only used in the legacy path.
  • We don't inspect the error so no need to have tmp_error.

Fixes: #375

We should only scale the canvas in the legacy path, since the viewport
already takes care of scaling.

Also, while we're here:

- We should `cairo_save` before scaling, so that on error the
  `cairo_restore` doesn't leave the canvas in the scaled state.
- The SVG size is only used in the legacy path.
- We don't inspect the error so no need to have `tmp_error`.

Fixes: ximion#375
@ximion
Copy link
Owner

ximion commented Jan 20, 2022

Sorry for the delay, and thank you for providing a patch!
This change looks good (except for the weird commented-out code, but that was already there previously).

@ximion ximion merged commit 89a864e into ximion:master Jan 20, 2022
11 checks passed
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.

Some icons are wrongly rescaled
2 participants