Pinch Zoom Transformations
I have been trying to get pinch zoom working in a SurfaceView, and I can get it to detect if a pinch is happening and all, but here is my dilemma.
I am using canvas to draw a grid to the background. The grid is a 2d array of Rect objects, so as I pinch, I change the size of the Rects. My problem is getting it to zoom into the correct area of the grid.
So, my question is how to do the correct transformation on something like this? Is there a way to put an ImageView into the canvas and draw to that? I will post the relevant code when I get home from work later today, but I figured I would post this just to see if anyone had done something similar.
Thanks in advance!