B4J Question How to Zoom an ImageView in ScrollPane Following the Mouse Cursor

xulihang

Active Member
Licensed User
Longtime User
Here is the expected behavior.
Before zoom:


After zoom:



I am trying to do this by adjusting the HPosition and VPosition of the ScrollPane by calculating the coordinates in percentage of the mouse cursor in the ImageView. but it is a bit jumpy. Sample project attached.
 

Attachments

  • ZoomTest.zip
    3.6 KB · Views: 91
Last edited:
Reactions: byz

xulihang

Active Member
Licensed User
Longtime User
ZoomImageView works great but it is directly updating the ImageView's top and left, not suitable for my case using scrollpane.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…