O'Reilly logo

Advanced Perl Programming by Sriram Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 addtag.

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

pieslice, chord, arc. In the last case, the fill option is ignored.

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

First, last, both, or none. The end at which an arrow should be drawn.

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required