subsampling-scale-image-view icon indicating copy to clipboard operation
subsampling-scale-image-view copied to clipboard

how to get displacement coordinates?

Open n1ebe opened this issue 2 years ago • 1 comments

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

n1ebe avatar Aug 21 '23 23:08 n1ebe

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 等图像加载器

panpf avatar Oct 08 '23 03:10 panpf