GINO Graphics Suite - GINO v9.0  

gDrawCurve

Syntax

[C/C++:]
void gDrawCurveBy2D(int npts, GPOINT *points, int beg, int fin);
void gDrawCurveTo2D(int npts, GPOINT *points, int beg, int fin);
[F90:]
subroutine gDrawCurveBy2D(npts, points, beg, fin)
subroutine gDrawCurveTo2D(npts, points, beg, fin)

integer, intent(in) :: npts,beg,fin
type (GPOINT), intent(in) :: points(*)

Arguments

npts
Number of points

points
Array specifying series of relative or absolute points through which the curve is drawn

beg
End conditions for start of curve

= GXPOINT, Direction of curve calculated using extra point
= GNONE, No end conditions
= GANGLE, Direction of curve defined by angle

fin
End conditions for end of curve (as for start of curve)

Description

The routines gDrawCurveBy2D() and gDrawCurveTo2D() draw a smooth curve through the specified number of relative or absolute coordinate points. In the case of gDrawCurveBy2D(), the curve starts at the current drawing position and is drawn through npts series of vector increments. In the case of gDrawCurveTo2D() the curve starts at the first element in points and is drawn through the intervening npts points. The number of sub-increments is controlled by the current arc tolerance as set by gSetArcTolerance().

The start and end directions of the curve can be separately controlled by setting beg and fin to non-zero values. If beg or fin is set to GANGLE, the direction of the curve is specified directly in terms of cosine and sine values. If beg or fin is set to GXPOINT, the direction of the curve is calculated so that the curve would pass through an extra specified point as if it was extended to include that point. These angles and/or extra points defining the curve end conditions are set up using gSetCurveAttribs2D(). Note that, the curve drawing routines update the current curve end conditions so that the start and end angles match those of the curve that has been drawn. The current curve end conditions can be enquired by calling gEnqCurveAttribs2D().

See Also

gDrawCurveBy2D Usage
gEnqCurveAttribs2D
gSetArcTolerance
gSetCurveAttribs2D