GrArc()

Name

GrArc() -- Draw an arc

Synopsis

void GrArc ( GR_DRAW_ID id , GR_GC_ID gc , GR_COORD x , GR_COORD y , GR_SIZE rx , GR_SIZE ry , GR_COORD ax , GR_COORD ay , GR_COORD bx , GR_COORD by , int type );

Description

This function draws an arc on the specified drawable. The arc center is located at the position (x,y) with a horizontal radius of rx and a vertical radius of ry. The arc is drawn from the point (ax,ay) to the point (bx,by). The endpoints must be specified relative to the arc center and must be positioned on the arc.

Note

If the endpoints are not on the arc, the arc will be drawn incorrectly.

Note

This function does NOT use floating point math. Therefore it is very efficient on architectures without floating point processors. If you know you will be running on a floating point processor, then it may be easier to use the GrArcAngle() function. But that function should only be used if you known you have floating point hardware.

Parameters

TypeNameDescription
GR_DRAW_IDgcThe ID of the drawable to draw the arc onto.
GR_GC_IDidThe ID of the graphics context to use when drawing the arc.
GR_COORDxThe X coordinate to draw the arc at relative to the drawable.
GR_COORDyThe Y coordinate to to draw the arc at relative to the drawable.
GR_SIZErxThe radius of the arc along the X axis.
GR_SIZEryThe radius of the arc along the Y axis.
GR_COORDaxThe X coordinate start of the arc relative to the drawable.
GR_COORDayThe Y coordinate start of the arc relative to the drawable.
GR_COORDbxThe X coordinate end of the arc relative to the drawable.
GR_COORDbyThe Y coordinate end of the arc relative to the drawable.
inttypeThe fill style to use when drawing the arc. See below for a list of the available arc types.

Arc Types

The following table lists the possible arc types that may used with this function.

Pixel FormatDescription
GR_ARCDraws just the arc.
GR_ARCOUTLINEDraws the arc with radius lines from the center to the endpoints. This results in a pie piece shaped outline.
GR_PIEDraws the arc with radius lines from the center to the endpoints. The resulting pie piece shaped outline is filled with the foreground color.

See Also

GrLine(), GrRect(), GrPoly(), GrEllipse(), GrArcAngle().