question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zoom to previous position (x y coordinates and scale)

See original GitHub issue

I’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:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
pradeep-orbicommented, Jul 21, 2021

How to zoom the image for the given coordinates ?

1reaction
PepaZapletalcommented, Feb 8, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found