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:

before-zoom.jpg

After zoom:
after-zoom.jpg



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: 81
Last edited:
  • Like
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
Top