PtArc
![]() |
![]() |
![]() |
![]() |
PtArc
An elliptical arc
Class hierarchy:
PtWidget → PtBasic → PtGraphic → PtArc
For more information, see the diagram of the widget hierarchy.
PhAB icon:

Public header:
<photon/PtArc.h>
Description:
You can use PtArc to create an elliptical arc that's defined by:
- the origin
- an ellipse
- a start angle
- an end angle.

Instances of PtArc: arcs, circles, ellipses, wedges, and chords.
The ellipse is specified using two control points stored in Pt_ARG_POINTS. These points are relative to the widget's origin, Pt_ARG_ORIGIN (see PtGraphic). If the points aren't set, the ellipse is specified by the widget's dimensions, Pt_ARG_DIM.
An arc is drawn along the ellipse in a counter-clockwise direction, starting at the start angle and finishing at the end angle. The start and end angles are specified by two resources: Pt_ARG_ARC_START and Pt_ARG_ARC_END.
The arc may be scaled directly by scaling its defining points. Scaling a circular arc by unequal amounts in the x and y directions results in an elliptical arc.
The arc may also be drawn as a closed curve by specifying the arc type with the Pt_ARG_ARC_TYPE resource:
- Pt_ARC_CURVE — draws the arc inscribed by the points
- Pt_ARC_PIE — draws the arc inscribed by the points with lines drawn from the two end points to the centroid of the arc, creating a pie-slice
- Pt_ARC_CHORD — draws the arc inscribed by the points with the chord connecting the two end points closing the curve.
New resources:
| Resource | C type | Pt type | Default |
|---|---|---|---|
| Pt_ARG_ARC_END | unsigned short | Scalar | 0 |
| Pt_ARG_ARC_START | unsigned short | Scalar | 0 |
| Pt_ARG_ARC_TYPE | unsigned short | Scalar | Pt_ARC_CURVE |
Pt_ARG_ARC_END
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | 0 |
The end angle, in tenths of a degree.
Pt_ARG_ARC_START
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | 0 |
The start angle, in tenths of a degree. If this angle is 0, the arc starts on the horizon, to the right of the center. Angles increase in a counter-clockwise direction.
Pt_ARG_ARC_TYPE
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | Pt_ARC_CURVE |
The type of arc; one of:
- Pt_ARC_CHORD
- Curve with ends connected by a straight line.
- Pt_ARC_CURVE
- Curve only.
- Pt_ARC_PIE
- Curve with ends connected to the center.
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.
![]() |
![]() |
![]() |
![]() |

![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)
