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 theSetClip
procedure.
PROCEDURE SetClip (rgn:\xDDRgnHandle);
rgn
- A handle to the region to be set as the current port's clipping region.
DESCRIPTION
TheSetClip
procedure changes the clipping region of the current graphics port to the region specified in thergn
parameter. TheSetClip
procedure doesn't change the region handle, but instead affects the clipping region itself. SinceSetClip
copies the specified region into the current graphics port's clipping region, any subsequent changes you make to the region specified in thergn
parameter 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
GetClip
andSetClip
procedures to preserve the current clipping region: useGetClip
to save the current port's clipping region, and useSetClip
to restore it.All other system software routines preserve the current clipping region.
SPECIAL CONSIDERATIONS
TheSetClip
procedure 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.