Zoomable icon indicating copy to clipboard operation
Zoomable copied to clipboard

How to zoom at the center of the image programmatically

Open hellosagar opened this issue 4 months ago • 3 comments

I've take a look at this PR. According to this I can use

zoomState.changeScale(
     zoomstate.scale * 2,
     Offset(X,Y),
)

Where X and Y would be if I understood it correctly. @usuiat Is the formula looks correct to you?

X = (w∗scale−w)/2
Y = (h∗scale−h)/2

Currently cant access the layout size from the zoomState. How can I achieve this?

hellosagar avatar Apr 10 '24 13:04 hellosagar