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


InvertArc

To invert the pixels of a wedge, use the InvertArc procedure.

PROCEDURE InvertArc (r:\xDDRect; 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
The InvertArc procedure inverts the pixels enclosed by a wedge of the oval bounded by the rectangle that you specify in the r parameter. Every white pixel becomes black and every black pixel becomes white. As in the FrameArc procedure described on page 3-68 and as illustrated in Figure 3-21, use the startAngle and arcAngle parameters to define the arc of the wedge.

This procedure leaves the location of the graphics pen unchanged.

SPECIAL CONSIDERATIONS
The InvertArc procedure was designed for 1-bit images in basic graphics ports. This procedure operates on color pixels in color graphics ports, but the results are predictable only with direct devices or 1-bit pixel maps. For indexed pixels, Color QuickDraw performs the inversion on the pixel indexes, which means the results depend entirely on the contents of the CLUT (which is described in the chapter "Color QuickDraw"). The eight colors used in basic QuickDraw are stored in a color table represented by the global variable QDColors. To display those eight basic QuickDraw colors on an indexed device, Color QuickDraw uses the Color Manager to obtain indexes to the colors in the CLUT that best map to the colors in the QDColors color table. Because the index, not the color value, is inverted, the results are unpredictable.

Inversion works better for direct pixels. Inverting a pure green, for example, that has red, green, and blue component values of $0000, $FFFF, and $0000 results in magenta, which has component values of $FFFF, $0000, and $FFFF.

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


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996