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


CopyRgn

To make a copy of a region, use the CopyRgn procedure.

PROCEDURE CopyRgn (srcRgn,dstRgn:\xDDRgnHandle);
srcRgn
A handle to the region to copy.
dstRgn
A handle to the region to receive the copy.
DESCRIPTION
The CopyRgn procedure copies the mathematical structure of the region whose handle you pass in the srcRgn parameter into the region whose handle you pass in the dstRgn parameter; that is, CopyRgn makes a duplicate copy of srcRgn. When calling CopyRgn, pass handles that have been returned by the NewRgn function in the srcRgn and dstRgn parameters.

Once this is done, the region indicated by srcRgn may be altered (or even disposed of) without affecting the region indicated by dstRgn. The CopyRgn procedure does not create the destination region; space must already have been allocated for it by using the NewRgn function.

SPECIAL CONSIDERATIONS
The CopyRgn 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