Alessandro71 Well-Known Member Licensed User Longtime User Feb 18, 2023 #1 HugeImageView starts all zoomed out at the center of the image. Is it possible to center a specific point in the image and set a zoom level?
HugeImageView starts all zoomed out at the center of the image. Is it possible to center a specific point in the image and set a zoom level?
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2023 #2 Change the last line in SetBitmap to: B4X: ZoomChanged(pnl.Width / 2, pnl.Height / 2, 2) This will set the image to be centered and with zoom level 2. You will need to do some math to zoom to a specific point. Last edited: Feb 20, 2023 Upvote 0
Change the last line in SetBitmap to: B4X: ZoomChanged(pnl.Width / 2, pnl.Height / 2, 2) This will set the image to be centered and with zoom level 2. You will need to do some math to zoom to a specific point.
Alessandro71 Well-Known Member Licensed User Longtime User Feb 19, 2023 #3 Erel said: Change the last line in SetBitmap to: B4X: ZoomChanged(pnl.Width / 2, pnl.Height / 2, 2) This will set the image to be centered and with zoom level 2. You will need to do some match to zoom to a specific point. Click to expand... The starting point will be different for each image, so I'll try to devise a "reverse geocoding" Upvote 0
Erel said: Change the last line in SetBitmap to: B4X: ZoomChanged(pnl.Width / 2, pnl.Height / 2, 2) This will set the image to be centered and with zoom level 2. You will need to do some match to zoom to a specific point. Click to expand... The starting point will be different for each image, so I'll try to devise a "reverse geocoding"