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 / Creating and Managing Regions


SectRgn

To calculate the intersection of two regions, use the SectRgn procedure.

PROCEDURE SectRgn (srcRgnA,srcRgnB,dstRgn: RgnHandle);
srcRgnA
A handle to the first of two regions whose intersection is to be determined.
srcRgnB
A handle to the second of two regions whose intersection is to be determined.
dstRgn
A handle to the region to receive the intersection area.
DESCRIPTION
The SectRgn procedure calculates the intersection of the two regions whose handles you pass in the srcRgnA and srcRgnB parameters, and it places the intersection in the region whose handle you pass in the dstRgn parameter. If the regions do not intersect, or one of the regions is empty, SectRgn sets the destination to the empty region defined by the rectangle (0,0,0,0).

The SectRgn procedure does not create a destination region; you must have already allocated memory for it by using the NewRgn function.

The destination region may be one of the source regions, if desired.

SPECIAL CONSIDERATIONS
The SectRgn procedure may temporarily use heap space that's twice the size of the two input regions.

The SectRgn 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