is Fit. You have the size of the input area from the
PointerInputScope
the bitmap has width and height. That's all you need
a
AmrJyniat
12/05/2022, 2:00 PM
Can you elaborate more please?
Yes, I have the bitmap and Image() sizes, but my question is how to get the bitmap offset while
detectTapGestures
gives me the Image() offset
k
Kirill Grouchnikov
12/05/2022, 2:30 PM
Let’s say your
Image
is 400x400, and your bitmap is
1000x2000
. If the scale is fit, you compute the scale factor yourself, which is 0.2 in this case, which then used to determine the position of the bitmap inside your image - the bitmap is 200x400, offset horizontally by 100. And that would give you the next step, translating coordinates of the click from image to bitmap.