Skip to content

Fix scaling error of SVGs #2953

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

Closed
wants to merge 1 commit into from
Closed

Conversation

semiversus
Copy link

This small pull-requests solves a problem when SVG are drawn with DPI scaling factor != 1.0 and tiny-skia. The problem is described in #2825.

In the draw_image function of Engine (in tiny_skia/src/engine.rs) the variable pyhsical_bounds is used, but it should be *bounds (same as in the Image:Raster arm).

                self.vector_pipeline.draw(
                    &svg.handle,
                    svg.color,
                    physical_bounds,  // <- *bounds is expected
                    svg.opacity,
                    _pixels,
                    transform,
                    clip_mask,
                );

@semiversus
Copy link
Author

Closed in favor of #2954

@semiversus semiversus closed this May 22, 2025
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