Overview of Item Types

Rectangle Items

Items of type rectangle appear as rectangular regions on the display. Each rectangle may have an outline (pen color), a fill, or both. Rectangles are created with widget commands of the following form:

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 If a rectangle is created without any points, it will not be rendered until some points are added with the coords command. 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:

-fill [23] Specifies fill color of item

-joinstyle [32] Specifies how to draw the joints within multi-point lines

-pen [45] Specifies pen color of item

-penwidth [46] Specifies width of pen


Pad++ Reference Manual - 20 JUN 1997

Copyright Computer Science Department, The University of New Mexico

Web Accessibility