Drawing items on the canvas
Objects added to the canvas are called items. New items are added to the canvas using different create methods such as create_line
, create_arc
, create_oval
, create_rectangle
, create_polygon
, create_text
, create_bitmap
, and create_image
.
Items added to the canvas are placed in a stack. New items are added on top of items already on the canvas. Every time you add an item using one of the various create methods, it returns a unique item handle or an item ID that is a unique integer. This item handle can be used to refer to and manipulate the added item.
In addition to an item handle, items can have the following item specifiers:
tags
are specifiers that we can add to one or more itemsALL
(or the string all) matches all items on the canvas- CURRENT (or
current
) matches the item under the mouse pointer if any
We can use any of the preceding item specifiers for methods that act on canvas items.
To add a tag to an item, you specify the tag (which is a string) as its configurable...