zoom relative to a center point problem
in
Programming Questions
•
1 year ago
I need to zoom to my sketch relative to the fingers center point . the problem is that when I add translate to center point every thing is translated . even the position of that center point !
- scale(zoom);
- ellipse(centerX,centerY);
- translate(width/2,height/2);
so with the above code it draw an ellipse which show the center point , and it's correct , but when I add translate to center point everything is wrong even the position of the ellipse changes ! where should I put this translate to center point ? I want to just zoom relative to center point . even when I add translate for panning the same thing is happening.
please help !
1