A Canvas widget implements structured graphics. It displays any number of items, such as arcs, lines, ovals, polygons, rectangles, text, bitmaps, images and embedded windows, which may be drawn, moved, re-colored and bound to events. Inherits from Widget, XView and YView, so the view can be scrolled horizontally and vertically with xview() and yview(). Refer to the Tk canvas manual page for the full list of widget and item options.
Return a 4-tuple (x1, y1, x2, y2) giving an approximate bounding box, in pixels, that encloses all the items given by tagOrId and any further tagOrIds.
Delete from each of the items given by tagOrId the characters (for text items) or coordinates (for line and polygon items) in the range from first to last inclusive; last defaults to first.
Return a tuple of the ids of all items selected by the search specification searchSpec (and any further args), in stacking order with the lowest item first.
With tagOrId, set the keyboard focus for the canvas to the first item given by tagOrId that supports the insertion cursor; the focus is left unchanged if no such item exists.
Return as an integer the numerical index within tagOrId corresponding to index, which is a textual description of a position (for text items an index into the characters, for line and polygon items a…
Move all items given by tagOrId to a new position in the display list just above the item given by aboveThis, or to the top of the display list if aboveThis is omitted.
Move all items given by tagOrId to a new position in the display list just below the item given by belowThis, or to the bottom of the display list if belowThis is omitted.
Move each of the items given by tagOrId in the canvas coordinate space by adding xAmount to every x-coordinate and yAmount to every y-coordinate of the item.
Move the items given by tagOrId so that the first coordinate pair (the upper-left corner of the bounding box) of the lowest matching item is at position (x, y).
Adjust the end of the selection in tagOrId nearest to index so that it is at index, and make the other end the anchor point for future select_to() calls.
Move all items given by tagOrId to a new position in the display list just below the item given by belowThis, or to the bottom of the display list if belowThis is omitted.
Move all items given by tagOrId to a new position in the display list just above the item given by aboveThis, or to the top of the display list if aboveThis is omitted.
Move all items given by tagOrId to a new position in the display list just above the item given by aboveThis, or to the top of the display list if aboveThis is omitted.
Return the type of the item given by tagOrId (the first matching item if it matches several), such as 'rectangle' or 'text', or None if tagOrId does not match any item.