0
Answer

Implementing Panning

Ask a question
I am writing a light duty CAD program and am having difficulty implementing panning.  I would like to be able to pan a drawing by grabbing it with the mouse, holding down the left mouse button and moving drawing synchronously with the movement of the mouse. 

The image pans correctly, but the mouse cursor moves faster than the image. Is there a code sample for implementing panning correctly?