Important: The information in this document is obsolete and should not be used for new development.
CloseRgnTo organize a collection of lines and shapes into a region definition, use the
PROCEDURE CloseRgn (dstRgn: rgnHandle);
- The handle to the region to close.
stops the collection of lines and framed shapes, organizes them into a region definition, and saves the result in the region whose handle you pass in the dstRgnparameter
handle youpass in the
dstRgnparameter should be a region handle
CloseRgnprocedure does not create the destination region; you must have already allocated space for it by using the
CloseRgnprocedure calls the
ShowPenprocedure, balancing the call to the
HidePenprocedure made by
When you no longer need the memory occupied by the region, use the
DisposeRgnprocedure, described next.
SPECIAL CONSIDERATIONSRegions are limited to 32 KB in size in basic QuickDraw and 64 KB in Color QuickDraw. When you record drawing operations in an open region, the resulting region description may overflow this limit. Should this happen in Color QuickDraw, the
QDErrorfunction (described in the chapter "Color QuickDraw" in this book) returns the result code
regionTooBigError. Since the resulting region is potentially corrupt, the
CloseRgnprocedure returns an empty region if it detects
CloseRgnprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.
SEE ALSOListing 3-8 on page 3-24 illustrates how to use this procedure.