void pxgdp_circular_arc (
Pxprim_type prim_type, /*primitive type */
PXPRIM_POLYLINE =1
polyline PXPRIM_FILL_AREA =2
fill area PXPRIM_FILL_AREA_SET =3
fill area set PXPRIM_POLYMARKER =4
polymarker
Ppoint *center, /*X and Y coordinates of the center in MC */ Pfloat radius, /*radius of the arc in MC */ Pfloat start_angle, /*start angle in radians (see note) */ Pfloat end_angle, /*end angle in radians */ Pfloat chordal_dev /*chordal deviation in DC */
)
Depending on the edit mode, a GDP Circular Arc element is inserted into the open structure after the current element or replaces the current element. The newly inserted element becomes the current element.
As specified by Primitive Type, the new element will be rendered as a polyline, fill area, fill area set, or polymarker, using the current attributes for that element type.
Chordal deviation refers to the maximum distance between the desired curve and the midpoint of a segment making up the polyline approximation of the curve. Thus, the smaller the chordal deviation, the smoother the curve. Since the smoothness of a curve is ultimately limited by the resolution of the workstation display, specifying a chordal deviation which is smaller than the workstation pixel size will not improve the display, and will slow GPHIGS considerably, because it is forced to calculate and draw an excessive number of vertices.
Note: The macro PXDEGREES_TO_RADIANS converts degrees to radians:
Radians = Degrees * PXDEGREES_TO_RADIANS
where PXDEGREES_TO_RADIANS = 0.017453293 radians/degree.
The following macros may also be helpful:
PXPI_OVER_2 = 1.5707963 radians (90 degrees) PXPI = 3.1415927 radians (180 degrees) PX2_PI = 6.2831853 radians (360 degrees)
GDP ellipse, see pxgdp_ellipse, pxgdp_ellipse3
GDP elliptical arc, see pxgdp_elliptical_arc, pxgdp_elliptical_arc3