Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines


Drawing Arcs and Wedges

An arc is defined as a portion of an oval's circumference bounded by a pair of radii. A wedge is a pie-shaped segment bounded by a pair of radii, and it extends from the center of the oval to the circumference. You use the FrameArc procedure to draw an arc, and you use the PaintArc or FillArc procedure to draw a wedge. Using the EraseArc procedure, you can erase a wedge, and, using InvertArc, you can reverse the colors of all pixels within a wedge. (Although this procedure operates on color pixels in color graphics ports, the results of InvertArc are predictable only with 1-bit and direct color pixels.)

These procedures take three parameters: a rectangle that defines an oval's boundaries, an angle indicating the start of the arc (the variable startAngle), and an angle indicating the arc's extent (the variable arcAngle). For the angle parameters, 0 indicates a
vertical line straight up from the center of the oval. Positive values indicate angles in the clockwise direction from this vertical line, and negative values indicate angles in the counterclockwise direction, as shown in Figure 3-20.

Figure 3-20 Using angles to define the radii for arcs and wedges



Subtopics
FrameArc
PaintArc
FillArc
EraseArc
InvertArc

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996