yes. you need to break up your translate into two stages, and do the scaling between them, while the center of your coordinate system is still at 0,0.
- translate(width/2, height/2);
- scale(amt)
- translate(-avgx, -avgy);
For a recent related discussion, see:
1 Like