Baseflow / PhotoView

Implementation of ImageView for Android that supports zooming, by various touch gestures.
https://baseflow.com
Apache License 2.0
18.79k stars 3.92k forks source link

How to scroll to a given coordinate in image #43

Closed postacik closed 10 years ago

postacik commented 11 years ago

When the image is zoomed, I want PhotoViewer to scroll to a given coordinate (x,y) of the image if that coordinate is not visible.

Is there a method in the library to achieve this?

I tried to use zoomTo() function but it didn't work or I didn't use it with proper parameters.

smarek commented 10 years ago

Scroll of image is determined by current display rectangle and scale level, You can obtain both using RectF getDisplayRect() and float getScale()