Important: The information in this document is obsolete and should not be used for new development.
SetClip
To change the clipping region of the current graphics port (basic or color) to a region you specify, use theSetClipprocedure.
PROCEDURE SetClip (rgn:\xDDRgnHandle);
rgn- A handle to the region to be set as the current port's clipping region.
DESCRIPTION
TheSetClipprocedure changes the clipping region of the current graphics port to the region specified in thergnparameter. TheSetClipprocedure doesn't change the region handle, but instead affects the clipping region itself. SinceSetClipcopies the specified region into the current graphics port's clipping region, any subsequent changes you make to the region specified in thergnparameter do not affect the clipping region of the graphics port.The initial clipping region of a graphics port is an arbitrarily large rectangle. You can set the clipping region to any arbitrary region, to aid you in drawing inside the graphics port--for example, to avoid drawing over scroll bars when drawing into a window, you could define a clipping region that excludes the scroll bars.
You can use the
GetClipandSetClipprocedures to preserve the current clipping region: useGetClipto save the current port's clipping region, and useSetClipto restore it.All other system software routines preserve the current clipping region.
SPECIAL CONSIDERATIONS
TheSetClipprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
Figure 2-4 on page 2-11 illustrates a clipping region that has been set to exclude the scroll bars of a window.