Zoom to previous position (x y coordinates and scale)
See original GitHub issueI’m using Photoview for showing pictures. So user can zoom the image and then draw some point.
There is also a function to delete this point. In this case I redraw whole bitmap:
matrix = new Matrix();
canvas.drawBitmap(bmp, matrix, paint);
setImageBitmap(bmp);
But now I want to zoom image to previous position/coordinates.
This should work:
setScale(scale, focalX, focalY, false);
I know the scale but I need focalX, focalY.
How can I get it? Maybe I should somehow calculate it from the
getSuppMatrix(matrix);
But I’m not sure if it’s possible and how.
Do you have some tips? Help?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Android PhotoView - zoom to previous position (x y ...
But now I want to zoom image to previous position/coordinates. This should work: setScale(scale, focalX, focalY, false);. I know the scale but ...
Read more >Solved: ArcGIS Pro: How to zoom to xy coordinates navigate...
Click the Locate command in the Inquiry group on the Map core tab. In the Locate Pane, enter your coordinates and hit the...
Read more >How to zoom in on a point using scale and translate
If you like to zoom the image of the center then a solution is as follows: Translate the image. Scale the image by...
Read more >Trouble X/Y offsetting on scale for a zoom - CodeProject
As a result you are 'zooming' into the objects local point 0,0 (the object's x/y value). I want to change the x/y position...
Read more >Calculate coordinates after pinch-to-zoom gesture
After EDIT 2 you seem to have the right equation (the last equation) for the position of a point P after shifting/scaling. After...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How to zoom the image for the given coordinates ?
@omar-badreldin-softxpert Yes