Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get x, y coordinate in terms of the photo's dimensions for what is displayed #750

Open
Aditya94A opened this issue Feb 28, 2020 · 0 comments

Comments

@Aditya94A
Copy link

Aditya94A commented Feb 28, 2020

The photo has some dimensions, the display some other, the display rect of PhotoView some other. I'd simply like to get the coordinates of the window in terms of the image's actual width and height (so I can crop the image into exactly what it looks like in the window)

            Timber.d("rectf : " + it.toString())
            Timber.d("imageMatrix : " + ui.nineGridImageVertical.imageMatrix.toString())
            Timber.d("scale : " + ui.nineGridImageVertical.scale.toString())

I've been playing a fair bit with the above methods. I know I'm close, I can smell it, but I've been stuck on this for hours.

Just wondering if there's an officially recommended way to do this 😄 Any ideas?

Below is an example of a zoomed in panned around image. I'd like to know exactly how far away from the top left and bottom right did the user pan around, so I can crop out exactly the dimensions that are visible in the screen.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant