Post Reply

Pinch Zoom Transformations

9th August 2012, 04:10 PM   |  #1  
OP Junior Member
Thanks Meter: 4
 
12 posts
Join Date:Joined: Feb 2010
Hey everyone!

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!
Post Reply Subscribe to Thread

Tags
android, canvas, pinch zoom
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Software Development by ThreadRank