ARC(3G)
NAME
arc, ellipse, partial_arc, partial_ellipse - define an elliptical region to be filled and/or edged.
SYNOPSIS
C Syntax:
void arc (fildes,x_radius,y_radius,x_center,y_center,start,stop,
rotation,close_type);
int fildes,close_type;
float x_radius,y_radius,x_center,y_center,start,stop,rotation;
void partial_arc (fildes,x_radius,y_radius,x_center,y_center,
start,stop,rotation,close_type,closure);
int fildes,close_type,closure;
float x_radius,y_radius,x_center,y_center,start,stop,rotation;
void ellipse (fildes,x_radius,y_radius,
x_center,y_center,rotation);
int fildes;
float x_radius,y_radius,x_center,y_center,rotation;
void partial_ellipse (fildes,x_radius,y_radius,
x_center,y_center,rotation,closure);
int fildes,closure;
float x_radius,y_radius,x_center,y_center,rotation;
FORTRAN77 Syntax:
subroutine arc (fildes,x_radius,y_radius,x_center,y_center,
start,stop,rotation,close_type)
integer*4 fildes,close_type
real x_radius,y_radius,x_center,y_center,start,stop,rotation
subroutine partial_arc (fildes,x_radius,y_radius,x_center,y_center,
start,stop,rotation,close_type,closure)
integer*4 fildes,close_type,closure
real x_radius,y_radius,x_center,y_center,start,stop,rotation
subroutine ellipse (fildes,x_radius,y_radius,x_center,y_center,rotation)
integer*4 fildes
real x_radius,y_radius,x_center,y_center,rotation
subroutine partial_ellipse (fildes,x_radius,y_radius,x_center,y_center,
rotation,close_type,closure)
integer*4 fildes,close_type
real x_radius,y_radius,x_center,y_center,rotation
Pascal Syntax:
procedure arc (fildes:integer; x_radius,y_radius,
x_center,y_center,start,stop,rotation:real;
close_type:integer);
procedure partial_arc (fildes:integer; x_radius,y_radius,
x_center,y_center,start,stop,rotation:real;close_type,
closure:integer);
procedure ellipse (fildes:integer; x_radius,y_radius,
x_center,y_center,rotation:real);
procedure partial_ellipse (fildes:integer;
x_radius,y_radius,x_center, y_center,rotation:real;
closure:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
x_radius,y_radius Radii of the ellipse or arc in the x and y directions respectively.
x_center,y_center Coordinate of the ellipse or arc center.
start,stop Specify the limits of an elliptical arc in radians.
rotation Specifies the amount the ellipse or arc is to be rotated in radians.
close_type specifies how an arc is to be closed. Selected from: NO_CHORD (0), PIE (1) or CHORD (2).
closure If TRUE (1), and the polygon vertex list is non-empty and the last subpolygon was not yet closed, a boundary is added to close that subpolygon with a boundary. If FALSE (0), no boundary is added.
Discussion
An elliptical arc of specified radii centered at ( x_center,y_center ) is filled and/or outlined according to the current interior style. The arc is closed in one of three ways based on close_type. If close_type is NO_CHORD, only the arc is drawn. If close_type is PIE, two edges are added from the center of the arc to both the start and stop position. If close_type is CHORD, one edge is added that connects the start and stop postion of the arc. As with all output primitives, the arc is affected by the current drawing mode and write enable. The curve is drawn with chords of length specified in curve_resolution. For partial_arc and partial_ellipse, the vertices of the arc are added to the polygon vertex list, as in the case of partial_polygons. Elliptical arcs are drawn from start to stop. If stop is greater than start, the arc is drawn in a counter-clockwise direction. If stop is less than start, the arc is drawn in a clockwise direction.
If the transform mode has been set to THREE_D, the z value used is that of the current position. Circles and circular arcs are drawn by specifying x_radius and y_radius to be equal. Non-filled ellipses and arcs are generated by setting the interior style to INT_HOLLOW and edged.
SEE ALSO
curve_resolution(3G), drawing_mode(3G), fill_color(3G), interior_style(3G),
partial_polygon(3G), perimeter_color(3G), perimeter_type(3G),
perimeter_repeat_length(3G), polygon(3G), write_enable(3G),
Starbase Graphics Techniques.
NOTE
Doing any other Starbase call besides partial_arc, partial_ellipse, partial_polygon2d, partial_polygon3d, or dcpartial_polygon, in the middle of a list of procedure calls that add vertices to the polygon buffer and before a call to polygon, rectangle, arc, or ellipse produces unpredictable, device-dependent results.
Hewlett-Packard Company — May 11, 2021