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

[feature] Allow for pan and zoom with the mouse/trackpad to move the (infinite) canvas around #93

Open
mattrobineau opened this issue Jun 19, 2024 · 3 comments · May be fixed by #110
Open

Comments

@mattrobineau
Copy link

mattrobineau commented Jun 19, 2024

I was going to ask to have zooming added because it's hard to annotate accurately when you have a huge screenshot (like 2 screens in my case) and I found this was already discussed. The issue where it is mentioned (#49) is for something else and I would prefer this feature (pan/zoom) doesn't get lost.

The cool thing would be that it brings a ton of improvements

  • if something is hidden behind the toolbars, you can just move until its visible
  • you can draw in and outside the image (infinite canvas)
  • you can zoom in to work on a very small part of the image
  • you annotate very small or very big stuff
@gabm
Copy link
Owner

gabm commented Jun 20, 2024

I think you are right with this. That would be great! The technical foundation is there but my time is limited atm..

I can provide guidance though

@mattrobineau
Copy link
Author

@gabm I should have some time in the upcoming days. My rust skills are likely good enough to help however I've never wrote anything for GTK before or I guess relm in this case.

@gabm
Copy link
Owner

gabm commented Jun 21, 2024

great, i can help to give you a headstart.. you can contact me on matrix: @gabm:matrix.org.

The tech stack is:

  • rust as programming language
  • gtk/relm as UI Framework (buttons etc)
  • femtovg as vector graphics rendering toolkit (viewport, images, annotations)

You will want to work on the renderer - a femtovg-backed struct and manipulate the transform (translation, zoom) there...

@mattrobineau mattrobineau linked a pull request Aug 3, 2024 that will close this issue
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 a pull request may close this issue.

2 participants