A set of connected line segments
PtWidget --> PtBasic --> PtGraphic --> PtPolygon
For more information, see the diagram of the widget hierarchy.
<photon/PtPolygon.h>
The PtPolygon widget may be used to draw a set of connected line segments, called a "polyline", from the vertices of the line segments.
PtPolygon can display open or closed polygons.
The points provided to the widget in the Pt_ARG_POINTS resource specify the vertices of the polyline or polygon. These points are relative to the widget's Pt_ARG_ORIGIN. For more information, see PtGraphic.
For a polygon, the last vertex doesn't have to be the same as the first - the widget can close the polygon for you.
You can produce a polygon using this widget by specifying that the curve must be closed. This is controlled by the Pt_ARG_POLYGON_FLAGS resource.
You can use the flags to specify:
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_POLYGON_FLAGS | unsigned short | Flag | 0 |
C type | Pt type | Default |
---|---|---|
unsigned short | Flag | 0 |
This resource defines the type of polygon to be drawn. You can OR the following flag bits (defined in <photon/Pg.h>):
The default setting of this resource is 0; that is, no flags have been set.
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.