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 displacement coordinates? #577

Open
n1ebe opened this issue Aug 21, 2023 · 1 comment
Open

how to get displacement coordinates? #577

n1ebe opened this issue Aug 21, 2023 · 1 comment

Comments

@n1ebe
Copy link

n1ebe commented Aug 21, 2023

Hello, how can I get the X,Y displacement position of my subsamplingImageView, I need to cut the visible part of the image and I can't get those missing values, thank you very much.

val currentXOffset = subsamplingImageView.translationX.toInt()
val currentYOffset = subsamplingImageView.translationY.toInt()

give me 0

Thanks

@panpf
Copy link

panpf commented Oct 8, 2023

If you're looking for a zoom image component on Android, take a look at my ZoomImage (https://github.com/panpf/zoomimage) library. It can be used for View and Compose, supports scaling, panning, positioning, rotation, and super-large image subsampling. It also integrates image loaders such as sketch, glide, picasso, coil, etc.

如果你正在寻找 Android 上的变焦图像组件,可以看看我的 ZoomImage (https://github.com/panpf/zoomimage) 库。它可用于 View 和 Compose,支持缩放、平移、定位、旋转、超大图子采样,它还集成了 sketch、glide、picasso、coil 等图像加载器

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

2 participants