GSCCNV(3g,L) AIX Technical Reference GSCCNV(3g,L)
-------------------------------------------------------------------------------
gsccnv
PURPOSE
Converts a circular arc or full circle into a polyline.
C SYNTAX
int gsccnv_ (cx, cy, cr, bx, by, ex, ey, len, x, y, pre)
int *cx, *cy, *cr, *bx, *by, *ex, *ey, *len, *x, *y, *pre;
FORTRAN SYNTAX
INTEGER function gsccnv (cx, cy, cr, bx, by, ex, ey, len, x, y, pre)
INTEGER cx, cy, cr, bx, by, ex, ey, len, x(*), y(*), pre
PASCAL SYNTAX
FUNCTION gsccnv_ (
VAR cx, cy, cr, bx, by, ex, ey, len: INTEGER;
VAR x, y: ARRAY [1..k] of INTEGER;
VAR pre: INTEGER
): INTEGER [PUBLIC];
DESCRIPTION
The gsccnv subroutine converts a counterclockwise circular arc definition into
an array of vertices. The list of vertices can then be used to draw a circular
arc with the gspoly subroutine or to fill a circular arc with the gsfply
subroutine. In general, it can be concatenated with other list(s) of vertices
to draw or fill more complex shapes, such as chord arcs, pie arcs, and
rectangles with rounded corners.
When beginning and ending points are identical, the list of vertices contains
the full circle, which can then be drawn or filled.
Parameters
cx, cy Define the coordinates of the center of the circle.
cr Defines the radius of the circle, which must not be equal to 0.
If cr is negative, it is automatically converted to a positive value
for use by the subroutine.
Processed November 7, 1990 GSCCNV(3g,L) 1
GSCCNV(3g,L) AIX Technical Reference GSCCNV(3g,L)
bx, by Define the coordinates of the beginning point of the arc.
ex, ey Define the coordinates of the ending point of the arc.
len Defines the number of points in the coordinate x and y arrays. It
must be numerically at least one greater than the value contained in
the precision parameter, but not less than 65.
x, y Define, as coordinate arrays, the vertices that represent the circular
shape when drawn or filled.
pre Defines precision level, which specifies the maximum number of line
segments that can be generated for a full circle. The number of line
segments actually generated depends on the size of the circle.
There are four levels of precision that can be requested:
o 64 (65 vertices)
o 128 (129 vertices)
o 256 (257 vertices)
o 512 (513 vertices).
Therefore, len => pre + 1.
All other precision values are reserved and must not be used, as their
results are unpredictable. The default value for pre is 64.
The subroutine allows ample leniency toward the accuracy of the specification
of the beginning and ending points. The arc of the specified radius will
always start and end exactly at the specified points.
If the beginning and ending points are identical, a full circle of the
specified radius is generated.
When the subroutine is invoked, the length parameter must contain the maximum
number of entries in the x and y arrays. If erroneous conditions arise, len is
set to 0. Under normal conditions, len specifies the number of vertices
returned by the subroutine in the x and y arrays.
For Pascal, the application must declare the arrays passed as being fixed
length and declare the routine as accepting arrays of that length; the k in the
routine declaration must be a constant.
RETURN VALUE
GS_SUCC Successful.
GS_CORD Invalid coordinate.
GS_NCOR Invalid number of coordinates.
Processed November 7, 1990 GSCCNV(3g,L) 2