Overview of Item Types
pathName create rectangle x1 y1 x2 y2 [option value option value ...]The arguments x1, y1, x2, and y2 give the coordinates of two diagonally opposite corners of the rectangle After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure widget commands to change the item's configuration. The following options are supported for rectangles:
[73] -fill color
(available only for handle, HTML, polygon, portal and rectangle item types)
Fill the area of the rectangle with color, which may be specified in any of the forms accepted by Tk_GetColor. If color is "none" (the default), then the rectangle will not be filled.
[74] -joinstyle join
(available only for line, polygon, rectangle and spline item types)
Specifies how the joints at vertices are drawn. join may be one of:
bevel
: The joints are drawn without protruding. They are cut-off and sharp.
miter
: The joints are drawn protruding to a point.
round
: The joints are rounded.
[75] -pen color
(available only for handle, line, polygon, portal, rectangle, spline, text and textfile item types)
Draw an outline around the edge of the rectangle in color. Color may have any of the forms accepted by Tk_GetColor. If color is "none", then no outline will be drawn for the rectangle. This option defaults to black.
[76] -penwidth width
(available only for line, polygon, rectangle and spline item types)
Width specifies the width of the pen in current units to be drawn around the item. Wide lines will be drawn centered on the path specified by the points. If width is 0.0, then the pen will always be drawn one pixel wide, independent of the zoom. Width defaults to 1 pixel.
Generated with Harlequin WebMaker