I have this problem, please provide me with some suggestions. Imagine i have a rectangle of 374*378 and an image is loaded into that rectangle , now when a user clicks anywhere on that image , i will retrieve that point(upto this i am able to solve the problem).Now i have to make that point as center of the image and take the surrounding portion of the image and fit into the same rectangle. This is nothing but doing a zoomin depending on where the user clicks on that image. I really appreciate any suggestions
Well base your offset on the size of the display area. What I mean is, if they click on say 285,235 as an example, and your display area is 374 * 378, then base your offset off half your display area (i.e. 98... because 285 - (374 / 2) = 98) and the same for the height. That should set the image up so the point they clicked on ends up being in the middle. Hrm... I'm not sure if I explained that right... well can't hurt to try this forum isn't very active.