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


To draw an arc of the oval that fits inside a rectangle, use the FrameArc procedure.

PROCEDURE FrameArc (r: Rect; startAngle,arcAngle:\xDDInteger);
The rectangle that defines an oval's boundaries.

The angle indicating the start of the arc.
The angle indicating the arc's extent.
Using the pattern, pattern mode, and size of the graphics pen for the current graphics port, the FrameArc procedure draws an arc of the oval bounded by the rectangle that you specify in the r parameter. Use the startAngle parameter to specify where the arc begins as modulo 360. Use the arcAngle parameter to specify how many degrees the arc covers. Specify whether the angles are in positive or negative degrees; a positive angle goes clockwise, while a negative angle goes counterclockwise. Zero degrees is at 12 o'clock high, 90 (or -270) is at 3 o'clock, 180 (or -180) is at 6 o'clock, and 270 (or -90) is at 9 o'clock. Measure other angles relative to the bounding rectangle.\xDD

A line from the center of the rectangle through its upper-right corner is at 45, even if the rectangle isn't square; a line through the lower-right corner is at 135, and so on, as shown in Figure 3-20.

The arc is as wide as the pen width and as tall as the pen height. The pen location does not change.

The FrameArc procedure differs from other QuickDraw procedures that frame shapes in that the arc is not mathematically added to the boundary of a region that's open and being formed.

The FrameArc procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

Listing 3-7 on page 3-22 illustrates how to use this procedure.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996