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

Fix image draw scaling and positioning problem #649

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

ohmtech-rdi
Copy link
Owner

This PR fixes the way image are drawn in the context.
Inkscape is working internally at 96dpi for pt to mm management, and Illustrator only save SVG in pt, and assumes 72 dpi.
By using the context width and view box in cairo, we can apply a scale that will make it work for different versions and import options of Illustrator and Inkscape.

Finally, this also means we can just use native Illustrator SVG file directly.

To do:

  • Test with current files (Inkscape 1.0.2)
  • Test with Illustrator
  • Test with Inkscape 1.3, internal import
  • Test with Inkscape 1.3, cairo import

@ohmtech-rdi ohmtech-rdi added the bug Something isn't working label Jan 2, 2024
@ohmtech-rdi ohmtech-rdi self-assigned this Jan 2, 2024
@ohmtech-rdi ohmtech-rdi merged commit 1b2e80d into main Jan 2, 2024
21 checks passed
@ohmtech-rdi ohmtech-rdi deleted the fix-erbui-image-draw branch January 2, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant