saveClipRgn = NewRgn(); /* get an empty region */ GetClip( saveClipRgn ); /* save current */ SetClip( myClipRgn ); /* install desired clipRgn */ /*... ( draw a figure ) ... */
SetClip( saveClipRgn ); /* restore previous value */ DisposeRgn( saveClipRgn ); /* not needed any more */