To be useful, we need to know the position within the canvas.
This diagram attempts to illustrate that if we subtract the coordinates of the canvas from what being reported for the mouse position, we'll get exactly the position within the canvas.
The example on the next page shows the appropriate piece of magic.
|