
10 Perl/Tk Pocket Reference
Canvas Commands
$canvas->addtag(tag, searchSpec ?, arg, arg ... ?);
Adds tag to the list of tags associated with each item that
satisfies searchSpec. See Canvas Search Specifications
below.
$canvas->bbox(tagOrId ?, tagOrId ... ?);
Returns a list (x1, y1, x2, y2) giving an approximate
bounding box for all the items named by the tagOrId
arguments.
$canvas->bind(tagOrId ?, sequence => callback ?);
Associates callback to be invoked on events specified
with sequence with the items given by tagOrId. Use the
CanvasBind method to create a binding for the canvas as
a whole.
$canvas->canvasx(screenx ?, gridspacing ?);
Returns the canvas x-coordinate that is displayed at screen
x-coordinate screenx, possibly rounding to nearest multi-
ple of gridspacing units.
$canvas->canvasy(screeny ?, gridspacing ?);
Returns the canvas x-coordinate that is displayed at screen
y-coordinate screeny, possibly rounding to nearest multi-
ple of gridspacing units.
$canvas->coords(tagOrId ?, x0, y0 ... ?);
Queries or modifies the coordinates that define an item.
$canvas->createType(x, y ?, x, y ... ??, -option=>value ... ?);
Creates a new item of type Type at specified coordinates
and with list options. Currently Type may be: Arc, Bitmap,
Image, Line, Oval, Polygon, Rectangle, Text, or Window.
$canvas->dchars(tagOrId, first ?, last ?);
For items given by tagOrId, deletes the characters in the
range given by first and ...