A rectangle
PtWidget → PtBasic → PtGraphic → PtRect
For more information, see the diagram of the widget hierarchy.
<photon/PtRect.h>
A PtRect widget draws a single rectangle whose bounding box is defined by two points. To set these points, use the Pt_ARG_POINTS resource. These points are relative to the widget's Pt_ARG_ORIGIN. For more information, see PtGraphic.
If you don't set Pt_ARG_POINTS, the rectangle defaults to the size defined by Pt_ARG_POS and Pt_ARG_DIM (see PtWidget).
The rectangle can have square or rounded corners. For rounded corners, specify a radius in pixels for the curve at the corners by using the Pt_ARG_RECT_ROUNDNESS resource.
Resource | C Type | Pt Type | Default |
---|---|---|---|
Pt_ARG_RECT_ROUNDNESS | unsigned short | Scalar | 0 |
C type | Pt type | Default |
---|---|---|
unsigned short | Scalar | 0 |
Defines the number of pixels used for rounding the corners of the rectangle.
If the widget modifies an inherited resource, the “Default override” column indicates the new value. This modification affects any subclasses of the widget.