PtRect
A rectangle
Class hierarchy:
PtWidget --> PtBasic --> PtGraphic --> PtRect
For more information, see the diagram of the widget hierarchy.
PhAB icon:

Public header:
<photon/PtRect.h>
Description:
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).

A PtRect widget.
The rectangle can have square or rounded corners. For rounded corners, a radius must be specified in pixels for the curve at the corners. You specify the corner radius using the Pt_ARG_RECT_ROUNDNESS resource.
New resources:
| Resource | C Type | Pt Type | Default |
|---|---|---|---|
| Pt_ARG_RECT_ROUNDNESS | unsigned short | Scalar | 0 |
Pt_ARG_RECT_ROUNDNESS
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | 0 |
Defines the number of pixels used for rounding the corners of the rectangle.
Inherited resources:
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.
