>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: strgn.m,v 1.6 92/06/11 17:43:14 rws Exp $
>># 
>>#      SCCS:  @(#)  EGC.mc Rel 1.5	    (10/25/91)
>>#
>>TITLE XSetRegion CH10
>>ASSERTION A XSetRegion-1
A call to XSetRegion sets the clip_mask component of the gc
argument to the region r.
>>STRATEGY
Create a region using XCreateRegion.
Set the region to a rectangle using XUnionRectWithRegion.
Create a drawable using XCreateWindow.
Create a gc using XCreateGC.
Draw the clip mask rectangle using XFillRectangle.
Set the graphics function of the GC to GXxor using XSetFunction.
Set the foreground pixel of the gc to W_BG ^ W_FG using XSetForeground.
Set the clip mask of the gc to the region using XSetRegion.
Set every pixel in the drawable using XFillRectangle.
Verify that every pixel in the drawable is set to W_BG.
Destroy the region using XDestroyRegion.
>>ASSERTION A XSetRegion-2
When the GC argument does not name a defined GC, then a
BadGC error occurs.
>>STRATEGY
Create a GC.
Set GC id to -1 using XTestSetGContextOfGC.
Call test function using bad GC as the GC argument.
Verify that a BadGC error occurs.
