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

Zooming? #1

Open
jafioti opened this issue Aug 9, 2023 · 2 comments
Open

Zooming? #1

jafioti opened this issue Aug 9, 2023 · 2 comments

Comments

@jafioti
Copy link

jafioti commented Aug 9, 2023

Hi, glad to see someone wrote a little utility to view an svg. How difficult would it be to add zoom / pan ability? I'd assume not very since the library already handles resizing. I can help add it ,but some pointers on where to start would be welcome

@sdedovic
Copy link
Owner

Hmm I think that could make sense. How would the zooming be controlled?

I believe feh does this with either a CLI flag or keyboard shortcut.

I think the following line is responsible for transforming the SVG prior to rasterizing it:
https://github.com/sdedovic/svgview/blob/master/src/main.rs#L179

but it requires some testing. I am open to a PR. The main goal of this software is to render the SVG at the highest fidelity possible, meaning resizing the SVG and then rasterizing. So that will take a little bit of experimentation.

@jafioti
Copy link
Author

jafioti commented Aug 11, 2023

I'll mess around with it. I'm thinking zoom could be controlled by pinching on a trackpad or scrollwheel on mouse, and panning can be controlled by clicking and dragging.

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

No branches or pull requests

2 participants