GraArc |
ยท GraArc( [<aCenter>], <nRadius>, [<aEllipse>], [<nStartAngle>], [<nSweepAngle>] ) => Draws an Arc.Circles, arcs and ellipses are drawn using the function GraArc(). By default a circle is drawn as an outline with the color and the line width set by the function GraSetAttrLine(). The fill pattern and fill color for a filled circle can be specified with GraSetAttrArea(). The default for the fill pattern is the #define constant GRA_SYM_SOLID.
Parameters are :
<aCenter>:= { <nX0>, <nY0> }
<aCenter> is an array of two elements which determines the coordinates for the center point of the circle. The first element <nX0> specifies the x coordinate and the second element <nY0> specifies the y coordinate. The unit for the coordinates depends on the coordinate system defined for the presentation space. If no presentation space is specified, values for the coordinates are given in pixels, which is the unit for a window. The origin for the coordinates (the point {0,0}) is at the lower left. If <aCenter> is not specified, the center point of the circle is the current pen position.
<nRadius>
<nRadius> is a positive integer which indicates the radius of the circle.
<aEllipse> := { <nX1>, <nY1>, <nX2>, <nY2> }
The parameter <aEllipse> is needed to draw an ellipse. It is an array with four elements which designates the end points of both ellipse axes. The coordinates of both endpoints are calculated by the following equations (see sections "Description" and "Example"):
nXhorizontal := nX0 + nRadius * nX1 // ellipse axis in the
nYhorizontal := nY0 + nRadius * nY1 // x direction (horizontal)
nXvertical := nX0 + nRadius * nX2 // ellipse axis in the
nYvertical := nY0 + nRadius * nY2 // y direction (vertical)
The default value of <aEllipse> is {1,0,0,1}.
<nStartAngle>
<nStartAngle> determines the starting point from which an arc is drawn. It is a positive integer which indicates the number of degrees the starting point of the arc deviates in the counter clockwise direction from horizontal.
<nSweepAngle>
<nSweepAngle> is a positive integer which indicates the opening angle for the arc in degrees.