Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC
Previous Book Contents Book Index Next

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


FrameArc

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

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

The angle indicating the start of the arc.
arcAngle
The angle indicating the arc's extent.
DESCRIPTION
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.›

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.

SPECIAL CONSIDERATIONS
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.

SEE ALSO
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

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice