Options

The polygon item supports the following options, via the create_polygon method, and the itemconfig and itemcget configuration methods.

Table 18-1. Canvas Polygon Options

Option

Type

Description

fill

None

The color to use for the polygon interior. If an empty string is given, the interior is not drawn. Default is empty (transparent).

stipple

bitmap

The name of a bitmap which is used as a stipple brush when filling the polygon's interior. Typical values are "gray12", "gray25", "gray50", or "gray75". Default is a solid brush (no bitmap).

outline

None

The color to use for the polygon outline. If an empty string is given, the outline is not drawn. Default is "black".

width

distance

The width of the polygon's outline. Default is 1 pixel.

smooth

None

If non-zero, the given coordinates are interpreted as b-spline vertices.

splinesteps

None

The number of steps to use when smoothing the polygon outline. Default is 12.

tags

tuple

One or more tags to associate with the polygon. If only a single tag is to be used, you can use a single string instead of a tuple of strings.