My application is consist of several objects , images and .... when I pan into specific object and want to zoom into that the object jumps to the corner of screen always and I should again drag it to the middle of the screen . zoom is not smooth in other words. is it because I just write `zoom += 0.05;/ zoom -= 0.05` . should I do it in any other way ?
- void keyPressed() {
- if (key == 'a') {
- zoom += 0.05;
- }
- else if (key == 'z') {
- zoom -= 0.05;
- }
- scale(zoom);
1