Canvas
Table A.5
shows the properties of each item that
is supported by the canvas widget and configured by using the
widget’s itemconfigure method. The widget
itself has no particularly interesting properties. However, the
methods shown in the latter half of the table are the widget’s,
even if they mostly apply to the individual canvas item types. Please
note that all methods that take an item ID as a parameter can also
take a preconfigured tag name as a parameter.
Table A-5. Canvas Class
|
Item Properties |
Description |
|---|---|
|
Common properties | |
|
fill, outline |
Colors for filling the region and outline. |
|
tags |
A list of strings. These are tags applicable to this item. You can
add more to this list with |
|
stipple, outlinestipple |
Draw the interior or outline with a stipple pattern. The bitmap value specifies the stipple pattern. |
|
width |
Width of the outline. |
|
Arc | |
|
start, extent |
Angles in degrees, moving counterclockwise. |
|
style |
|
|
Bitmap | |
|
anchor |
As in widget properties shown earlier. |
|
bitmap |
The bitmap to display. |
|
background, foreground |
Colors for each of the bitmap pixels. |
|
Image | |
|
anchor |
As in widget properties shown earlier. |
|
image |
The image to display. |
|
Line | |
|
arrow |
|
|
arrowshape |
A reference to a list containing three dimensions a, b, and c like this: |
|
fill |
Color. |
|
smooth, splinesteps |
If 1, draws a bezier curve instead ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access