>># 
>># 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: chnggc.m,v 1.12 92/06/11 16:15:03 rws Exp $
>># 
>>#      SCCS:  @(#)  EGC.mc Rel 1.5	    (10/25/91)
>>#
>>TITLE XChangeGC CH05
>>ASSERTION A XChangeGC-1
A call to XChangeGC changes the components specified by the
valuemask argument in the specified GC to the values in the
values argument.
>>STRATEGY
Create a GC fg = W_FG, bg = W_BG, function = GXCopy.
Change the function component of the GC to GXxor using XChangeGC.
Plot point (0,0) with XDrawPoint.
Set fg to W_FG ^ W_BG using XChangeGC.
Plot point (0,0) with XDrawPoint.
Verify that pixel at (0,0) is W_BG.
>>ASSERTION A XChangeGC-2
When a call to XChangeGC changes the clip-mask component of
gc, then any previous XSetClipRectangles request on the
specified GC is overridden.
>>STRATEGY
Create a GC.
Draw line from (0, 0) to (100, 0) using XDrawLine.
Save image on drawable using XGetImage.
Clear drawable.
Change the clip_mask component of the GC using XSetClipRectangles.
Draw line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that the image on the drawable is altered.
Change the GC clip_mask component using XChangeGC to original.
Draw line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that the image is restored.
>>ASSERTION A XChangeGC-3
When a call to XChangeGC changes the dash-offset or dashes
component of gc, then any previous XSetDashes request on the
specified GC is overridden.
>>STRATEGY
Create a GC.
Draw dashed line from (0, 0) to (100, 0) using XDrawLine.
Save image on drawable using XGetImage.

Part 1. Verify cancelling when GCDashList is used.
Change the dashes component of the GC
Draw dashed line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that XSetDashes altered image on drawable.
Change the GC dashes component using XChangeGC to original value.
Draw dashed line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that the image is as before XSetDashes.

Part 2. Verify cancelling when GCDashOffset is used.
Change the dash_offset component of the GC using XSetDashes.
Draw dashed line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that XSetDashes altered image on drawable.
Change the GC dash_offset component using XChangeGC to original value.
Draw dashed line from (0, 0) to (100, 0) using XDrawLine.
Verify using XGetImage that the image is as before XSetDashes.
>>ASSERTION A XChangeGC-4
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.
>>ASSERTION A XChangeGC-5
When the font does not name a valid font, and the GCFont
bit is set in valuemask, then a BadFont error occurs.
>>STRATEGY
Create a font for the default screen and free font with XFreeFont.
Create a GC with root window as the drawable.
Change GC using XChangeGC with bad font as the font component.
Verify that a BadFont error occurs. 
>>ASSERTION A XChangeGC-6
When the tile does not name a valid pixmap, and the GCTile
bit is set in valuemask, then a BadPixmap error occurs.
>>STRATEGY
Create a bad pixmap for the root window and free pixmap with XFreePixmap.
Create a GC with window as the drawable.
Change GC using XChangeGC with pixmap as the tile.
Verify that a BadPixmap error occurs. 
>>ASSERTION A XChangeGC-7
When the stipple does not name a valid pixmap, and the
GCStipple bit is set in valuemask, then a BadPixmap error
occurs.
>>STRATEGY
Create a bad pixmap for the root window and free pixmap with XFreePixmap.
Create a GC with window as the drawable.
Change GC using XChangeGC with pixmap as the stipple.
Verify that a BadPixmap error occurs. 
>>ASSERTION A XChangeGC-8
When the clip-mask does not name a valid pixmap, or None,
and the GCClipMask bit is set in valuemask, then a
BadPixmap error occurs.
>>STRATEGY
Create a bad pixmap for the root window and free pixmap with XFreePixmap.
Create a GC with window as the drawable.
Change GC using XChangeGC with pixmap as the clip_mask.
Verify that a BadPixmap error occurs. 
>>ASSERTION C XChangeGC-9
When the graphics context and the tile pixmap do not have
the same depth, and the GCTile bit is set in valuemask,
then a BadMatch error occurs.
>>STRATEGY
For all non-depth1 drawables:
	Created such a drawable.
	Create a depth 1 pixmap.
	Create a GC with window as the drawable.
	Change GC using XChangeGC with pixmap as the tile.
	Verify that a BadMatch error occurs. 
>>ASSERTION A XChangeGC-10
When the graphics context and the tile pixmap were not
created for the same root, and the GCTile bit is set in
valuemask, then a BadMatch error occurs.
>>STRATEGY
If multiple roots are supported:
	Create a pixmap for one root.
	Create a GC for another root 
	Change GC using XChangeGC with pixmap as the tile component.
	Verify that a BadMatch error occurs.
>>ASSERTION C XChangeGC-11
When the stipple pixmap does not have depth one, and the
GCStipple bit is set in valuemask, then a BadMatch error
occurs.
>>STRATEGY
If pixmaps with depth other than one are supported:
	Create a pixmap with depth other than one.
  	Create a GC 
	Change GC using XChangeGC with the pixmap as the stipple component.
  	Verify that a BadMatch error occurs.
>>ASSERTION C XChangeGC-12
When the graphics context and the stipple pixmap were not
created for the same root, and the GCStipple bit is set in
valuemask, then a BadMatch error occurs.
>>STRATEGY
If multiple roots are supported:
	Create a pixmap for one root.
	Create a GC for another root 
	Change GC using XChangeGC with pixmap as the stipple component.
  	Verify that a BadMatch error occurs.
>>ASSERTION C XChangeGC-13
When the clip-mask is set to a pixmap, and the clip-mask
does not have depth one, and the GCClipMask bit is set in
valuemask, then a BadMatch error occurs.
>>STRATEGY
If pixmaps with depth other than one are supported:
	Create a pixmap with depth other than one.
  	Create a GC 
	Change GC using XChangeGC with the pixmap as the clip_mask component.
  	Verify that a BadMatch error occurs.
>>ASSERTION C XChangeGC-14
When the clip-mask is set to a pixmap, and the graphics
context and the clip-mask were not created for the same
root, and the GCClipMask bit is set in valuemask, then a
BadMatch error occurs.
>>STRATEGY
If multiple roots are supported:
	Create a pixmap for one root.
	Create a GC for another root 
	Change GC using XChangeGC with the pixmap as the clip_mask component.
  	Verify that a BadMatch error occurs.
>>ASSERTION A XChangeGC-15
When the valuemask argument is other than a bitwise OR of
none or any of GCFunction, GCPlaneMask, GCForeground,
GCBackground, GCLineWidth, GCLineStyle, GCCapStyle,
GCJoinStyle, GCFillStyle, GCFillRule, GCTile, GCStipple,
GCTileStipXOrigin, GCTileStipYOrigin, GCFont,
GCSubWindowMode, GCGraphicsExposures, GCClipXOrigin,
GCClipYOrigin, GCClipMask, GCDashOffset, GCDashList, or
GCArcMode, then a BadValue error occurs.
>>STRATEGY
Create a gc 
Change GC using XChangeGC with function component GXcopy 
    and foreground component = 1 using a mask of GCFunction | GCForeground | 
    ~(GCFunction | GCPlaneMask | GCForeground | GCBackground |
    GCLineWidth | GCLineStyle | GCCapStyle | GCJoinStyle |
    GCFillStyle | GCFillRule | GCTile | GCStipple |
    GCTileStipXOrigin | GCTileStipYOrigin | GCFont | GCSubwindowMode |
    GCGraphicsExposures | GCClipXOrigin | GCClipYOrigin | GCClipMask |
    GCDashOffset | GCDashList | GCArcMode)
Verify that a bad value error occurred.
>>ASSERTION A XChangeGC-16
When the function is other than GXclear, GXand,
GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor,
GXor, GXnor, GXequiv, GXinvert, GXorReverse,
GXcopyInverted, GXorInverted, GXnand or GXset, and the
GCFunction bit is set in valuemask, then a BadValue error
occurs.
>>STRATEGY
Create a GC.
Change GC function to GXclear + GXand + GXandReverse + GXcopy + 
			GXandInverted + GXnoop + GXxor + GXor + GXnor + 
			GXequiv + GXinvert + GXorReverse +
			GXcopyInverted + GXorInverted + GXnand + GXset + 1
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-17
When the line_style is other than LineSolid,
LineDoubleDash or LineOnOffDash, and the GCLineStyle bit is
set in valuemask, then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC line_style to LineSolid + LineDoubleDash + LineOnOffDash + 1;
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-18
When the cap_style is other than CapNotLast, CapButt,
CapRound or CapProjecting, and the GCCapStyle bit is set in
valuemask, then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC cap_style to CapNotLast + CapButt + CapRound + CapProjecting + 1
Verify that a BadValue error occurred
>>ASSERTION A XChangeGC-19
When the join_style is other than JoinMiter, JoinRound or
JoinBevel, and the GCJoinStyle bit is set in valuemask,
then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC join_style to JoinMiter + JoinRound + JoinBevel + 1
Verify that a BadValue error occurs
>>ASSERTION A XChangeGC-20
When the fill_style is other than FillSolid, FillTiled,
FillStippled or FillOpaqueStippled, and the GCFillStyle bit
is set in valuemask, then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC fill_style to FillSolid + FillTiled + FillStippled + FillOpaqueStippled + 1
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-21
When the fill_rule is other than EvenOddRule or WindingRule,
and the GCFillRule bit is set in valuemask, then a BadValue
error occurs.
>>STRATEGY
Create a GC.
Change GC fill_rule to EvenOddRule + WindingRule + 1
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-22
When arc_mode is other than ArcChord or ArcPieSlice, and
the GCArcMode bit is set in valuemask, then a BadValue
error occurs.
>>STRATEGY
Create a GC.
Change GC arc_mode to ArcChord + ArcPieSlice + 1.
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-23
When the subwindow_mode is other than ClipByChildren or
IncludeInferiors, and the GCSubwindowMode bit is set in
valuemask, then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC subwindow_mode to ClipByChildren + IncludeInferiors + 1
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-24
When graphics_exposure is other than True or False, and
the GCGraphicsExposures bit is set in valuemask, then a
BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC graphics_exposures component to (int) False + (int) True + 1
Verify that a BadValue error occurred.
>>ASSERTION A XChangeGC-25
When dashes is set to zero, and the GCDashList bit is set
in valuemask, then a BadValue error occurs.
>>STRATEGY
Create a GC.
Change GC using XChangeGC with dashes component = 0
Verify that a BadValue error occurs.
