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 2 - Basic QuickDraw / Basic QuickDraw Reference
Routines / Managing Bitmaps, Port Rectangles, and Clipping Regions


GetClip

To save the clipping region of the current graphics port (basic or color), use the GetClip procedure.

PROCEDURE GetClip (rgn:\xDDRgnHandle);
rgn
A handle to the region to be clipped to match the clipping region of the current graphics port.
DESCRIPTION
The GetClip procedure changes the region specified in the rgn parameter to one that's equivalent to the clipping region of the current graphics port. The GetClip procedure doesn't change the region handle.

You can use the GetClip and SetClip procedures to preserve the current clipping region: use GetClip to save the current port's clipping region, and use SetClip to restore it. If, for example, you want to draw a half-circle on the screen, you can set the clipping region to half of the square that would enclose the whole circle, and then draw the whole circle. Only the half within the clipping region is actually drawn in the graphics port.

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