>># 
>># 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: drwpnts.m,v 1.5 92/06/11 16:40:35 rws Exp $
>># 
>>#      SCCS:  @(#)  function.mc Rel 1.11	    (1/23/92)
>>#      SCCS:  @(#)  plane-mas.mc Rel 1.9	    (6/10/91)
>>#      SCCS:  @(#)  foregroun.mc Rel 1.15	    (10/4/91)
>>#      SCCS:  @(#)  subwindow.mc Rel 1.11	    (6/15/92)
>>#      SCCS:  @(#)  clip-x-or.mc Rel 1.10	    (4/29/92)
>>#      SCCS:  @(#)  clip-y-or.mc Rel 1.1	    (7/1/91)
>>#      SCCS:  @(#)  clip-mask.mc Rel 1.11	    (12/20/91)
>>#      SCCS:  @(#)  EDra.mc Rel 1.5	    (10/25/91)
>>#      SCCS:  @(#)  EGC.mc Rel 1.5	    (10/25/91)
>>#      SCCS:  @(#)  EMat1.mc Rel 1.5	    (10/25/91)
>>#      SCCS:  @(#)  EMat2.mc Rel 1.4	    (10/25/91)
>>#      SCCS:  @(#)  EMat3.mc Rel 1.5	    (10/25/91)
>>#      SCCS:  @(#)  EVal.mc Rel 1.5	    (10/10/91)
>>#
>>TITLE XDrawPoints CH06
>>ASSERTION A XDrawPoints-1
A call to XDrawPoints draws npoints points specified by
points in the drawable d.
>>STRATEGY
Draw points.
Direct validation or pixmap compare.
>>ASSERTION - XDrawPoints-2
When the mode is CoordModeOrigin, then all coordinates are
treated as relative to the origin.
>>ASSERTION A XDrawPoints-3
When the mode is CoordModePrevious, then all coordinates
after the first are taken relative to the previous point.
>>STRATEGY
Draw points
Pixmap verify
>>ASSERTION B XDrawPoints-4
A call to XDrawPoints draws the points in the order listed
in the array.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XDrawPoints-5
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXclear, then the destination becomes (dst AND (NOT
plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXclear.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is 0.
>>ASSERTION A XDrawPoints-6
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXand, then the destination becomes ((src AND dst) AND
plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXand.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src&dest.
>>ASSERTION A XDrawPoints-7
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXandReverse, then the destination becomes ((src AND (NOT
dst)) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXandReverse.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src&~dest.
>>ASSERTION A XDrawPoints-8
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXcopy, then the destination becomes (src AND plane_mask)
OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXcopy.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src.
>>ASSERTION A XDrawPoints-9
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXandInverted, then the destination becomes (((NOT src) AND
dst) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXandInverted.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src&dest.
>>ASSERTION A XDrawPoints-10
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXnoop, then the destination becomes (dst AND plane_mask)
OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXnoop.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is dest.
>>ASSERTION A XDrawPoints-11
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXxor, then the destination becomes ((src XOR dst) AND
plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXxor.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src^dest.
>>ASSERTION A XDrawPoints-12
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is GXor,
then the destination becomes ((src OR dst) AND plane_mask)
OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXor.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src|dest.
>>ASSERTION A XDrawPoints-13
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXnor, then the destination becomes (((NOT src) AND (NOT
dst)) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXnor.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src&~dest.
>>ASSERTION A XDrawPoints-14
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXequiv, then the destination becomes (((NOT src) XOR dst)
AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXequiv.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src^dest.
>>ASSERTION A XDrawPoints-15
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXinvert, then the destination becomes ((NOT dst) AND
plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXinvert.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~dest.
>>ASSERTION A XDrawPoints-16
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXorReverse, then the destination becomes ((src OR (NOT
dst)) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXorReverse.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is src|~dest.
>>ASSERTION A XDrawPoints-17
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXcopyInverted, then the destination becomes ((NOT src) AND
plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXcopyInverted.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src.
>>ASSERTION A XDrawPoints-18
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXorInverted, then the destination becomes (((NOT src) OR
dst) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXorInverted.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src|dest.
>>ASSERTION A XDrawPoints-19
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXnand, then the destination becomes (((NOT src) OR (NOT
dst)) AND plane_mask) OR (dst AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXnand.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~src|~dest.
>>ASSERTION A XDrawPoints-20
When a graphics operation is performed and the source pixel
is src and the destination pixel is dst and function is
GXset, then the destination becomes ( plane_mask) OR (dst
AND (NOT plane_mask)).
>>STRATEGY
Find a point (f_pix_x, f_pix_y) that is drawn by the graphics operation.

Set function component of GC to GXset.
For destination pixel values dst = 0, 1, 2, 3
    For source pixel values of src = 0, 1
	Set all points in drawable to destination pixel value.
	Set foreground component of GC to source pixel value.
	  (or fill source drawable/image with source pixel value in the cases
	   of XCopyArea or XPutImage, while XCopyPlane always has it ~0 to
	   force a foreground fill).
	Do graphics operation.
	Verify that pixel value at f_pix_x, f_pix_y is ~0.
>>ASSERTION A XDrawPoints-21
The value for plane_mask is truncated to the depth of the
GC.
>>STRATEGY
Set foreground to pattern of 1's and 0's
Set plane-mask to values larger than the depth.
Verify that result is what would be expected if the extra bits
 were masked off.
>>ASSERTION A XDrawPoints-22
The plane_mask specifies which planes of the destination
are to be modified, one bit per plane, with bits being
assigned to planes from the least significant bit of the
word to the most significant bit.
>>STRATEGY
Set foreground to pattern of 1's and 0's
Select a variety of plane masks.
Verify that the expected pixels are drawn.
>>ASSERTION A XDrawPoints-23
The foregound component of the gc is used to determine the
foreground pixel value.
>>STRATEGY
Set foreground to various values.
Pixmap verify the results.
>>ASSERTION A XDrawPoints-24
The value for foreground is truncated to the depth of the
GC.
>>STRATEGY
Set foreground to value with all bits set.
Find a non background pixel.
Check that this is truncated to the depth.
>>ASSERTION A XDrawPoints-25
When subwindow_mode is ClipByChildren, then the
destination window and source (if it is a window) are
clipped by all viewable InputOutput children.
>>STRATEGY
Set subwindow-mode to be ClipByChildren
Cover window with many strip sub-windows.
Do drawing operation
Verify that all subwindows are clear.
>>ASSERTION A XDrawPoints-26
When subwindow_mode is IncludeInferiors, then neither the
destination window nor source (if it is a window) is clipped
by inferiors.
>>STRATEGY
Place subwindows over parts of the main window
Create subwindows over these windows as well.
Do graphics operation.
Verify that the operation was not affected.
>>ASSERTION A XDrawPoints-27
When subwindow_mode is IncludeInferiors on a window of one
depth with mapped inferiors of differing depth, then no
errors occur.
>>STRATEGY
If only one depth window supported
  Result is UNSUPPORTED

Find two visuals with different depths.
Use one of these visuals to create a window.
Use the other to create a subwindow.
Verify that no errors occur.
For information purposes only see if graphics operation is rendered properly.
>>ASSERTION A XDrawPoints-28
The clip origin coordinates clip-x-origin and clip-y-origin
are interpreted relative to the origin of the destination
drawable specified in the graphics operation.
>>STRATEGY
Create Pixmap and set clip-mask with it.
Vary clip origin
Verify nothing is drawn outside the clip_mask based on the origin.
Pixmap verify results inside the cliparea.
>>ASSERTION A XDrawPoints-29
When the clip_mask is set to None, then the pixels are
always drawn regardless of the clip origin.
>>STRATEGY
Set clip mask to None
Verify that things are still drawn.
>>ASSERTION A XDrawPoints-30
When pixels are outside the area covered by the clip_mask,
then they are not drawn.
>>STRATEGY
Create a pixmap depth 1.
Fill it with all ones.
Set this pixmap as the clip_mask.
Verify that nothing is drawn outside the clip-mask area.
Use a pixmap size of 5x5 to ensure that all tests have some part of the
drawing outside the clip-mask.
>>ASSERTION A XDrawPoints-31
When pixels have a clip_mask bit set to 1, and they would
be drawn, then they are drawn.
>>STRATEGY
Do graphics operation.
Save the image on the drawable.
Clear drawable.
Create a pixmap depth 1 that is the same size as the window.
Set all bits in pixmap to 1.
Set GC component clip-mask to pixmap using XSetClipMask.
Do graphics operation.
Verify that the images drawn were the same.

Set pixmap to a pattern.
Do graphics operation.
Pixmap verify the result.
>>ASSERTION A XDrawPoints-32
When pixels have a clip_mask bit set to 0, then they are
not drawn.
>>STRATEGY
Create a pixmap depth 1 that is the same size as the window.
Set all bits in pixmap to 0.
Set GC component clip_mask to pixmap using XSetClipMask.
Do graphics operation.
Verify that nothing is drawn.
>>ASSERTION A XDrawPoints-33
When a drawable argument does not name a valid Drawable,
then a BadDrawable error occurs.
>>STRATEGY
Create a bad drawable by creating and destroying a window.
Call test function using bad drawable as the drawable argument.
Verify that a BadDrawable error occurs.
>>ASSERTION A XDrawPoints-34
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 XDrawPoints-35
When a drawable argument is an InputOnly window then a
BadMatch error occurs.
>>STRATEGY
Create an InputOnly window.
Call test function using InputOnly window as the drawable argument.
Verify that a BadMatch error occurs.
>>ASSERTION A XDrawPoints-36
When the graphics context and the drawable do not have the
same depth, then a BadMatch error occurs.
>>STRATEGY
If only one depth supported
  report UNSUPPORTED
Create pixmap of depth 1.
Create gc of different depth.
Call test function with this pixmap and gc.
Verify that a BadMatch error occurs.
>>ASSERTION A XDrawPoints-37
When the graphics context and the drawable were not created
for the same root, then a BadMatch error occurs.
>>STRATEGY
If multiple screens are supported
  Create pixmap of depth 1.
  Create gc on alternate screen.
  Call test function with this pixmap and gc.
  Verify that a BadMatch error occurs.
else
  report UNSUPPORTED
>>ASSERTION A XDrawPoints-38
When the value of mode is other than CoordModeOrigin or
CoordModePrevious, then a BadValue error occurs.
>>STRATEGY
Obtain a sequence of values which are not in the list specified by VALUE_LIST.
For each value:
  Call test function with this value in the VALUE_ARG argument.
  Verify that a BadValue error occurs.
