When you set up a callback and use the
arguments to find out where the user clicked, you must translate that
information into Canvas coordinates (
explained in Chapter 15). To do this, use the
$x = $canvas->canvasx(
screenx [, gridspacing ]); $y = $canvas->canvasy(
screeny [, gridspacing ]);
Each method takes an optional gridspacing argument; the Canvas coordinate value will be rounded to the nearest value to fit the grid.