Attached is a short one-file example that creates a buffered image and
displays it in a JPanel.

Using the mouse you can pan, zoom and rotate the image as follows:

 * To zoom, drag left mouse button up (bigger) or down (smaller).
 * To pan, drag right mouse button in any direction.
 * To rotate, drag right mouse button left or right  with CTRL down.

The rotate and zoom are done about the center of the panel, i.e. you can
zoom in on the center of the image without it drifting off to the side. You
can also rotate the image about its current center.

I'm having a problem with my pan though.

Pan works fine if there is no rotation.

However, following a rotation, the image will 'jump' initially. After the
initial jump, it will track the mouse as desired.

Can anyone help me eliminate the initial jump when starting a pan following
a rotate?

Thank you,

Ted Hill

PanZoomTest4.java

Reply via email to