GrArc

Name

GrArc -- Draw an arc or pie

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
);

Parameters

id

The ID of the window or other drawable area.

gc

The graphics context to use when drawing the arc.

x, y

The center of the arc relative to the drawable area.

rx, ry

The radii of the arc.

ax, ay

The first point on the arc to draw.

bx, by

The last point on the arc to draw.

type

The method of drawinnng the arc. The type parameter has the following acceptable values:

ValueDescription
MWARCDraws the arc
MWARCOUTLINEDraws the arc and the radii to the endpoints
MWPIEDraws the arc filled with the foreground color

Description

The GrArc function draws an arc with its center at (x, y) and horizontal radius of rx and a vertical radius of ry. The function starts drawing the arc from (ax, ay) and draws the arc to (bx, by). When specifying the points on the angle, rember to state these points relative to the center point and that the positive values move away from the upper left corner of the window.

Note: If you set type to MWARCOUTLINE, the GrArc function draws lines from the center (x, y) to the endpoints (ax, ay) and (bx, by). If the endpoints you specify are not on the arc, then the GrArc function will not draw correctly.

Use the GrArc function when you do not have a floating-point processor. If your platform does have a floating point processor, then you should probably use GrArcAngle function instead.