XWorkstation.st
changeset 118 25e775072a89
parent 115 1d93fd8c5371
child 125 d74e6ab7157a
--- a/XWorkstation.st	Thu Mar 09 04:20:08 1995 +0100
+++ b/XWorkstation.st	Sat Mar 18 06:13:39 1995 +0100
@@ -30,7 +30,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.35 1995-03-07 21:57:31 claus Exp $
+$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.36 1995-03-18 05:13:21 claus Exp $
 '!
 
 !XWorkstation class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.35 1995-03-07 21:57:31 claus Exp $
+$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.36 1995-03-18 05:13:21 claus Exp $
 "
 !
 
@@ -1741,22 +1741,19 @@
 destroyGC:aGCId
 
 %{  /* NOCONTEXT */
-
     if (__isSmallInteger(aGCId)) {
 	BEGIN_INTERRUPTSBLOCKED
 	XFreeGC(myDpy, _GCVal(aGCId));
 	END_INTERRUPTSBLOCKED
 	RETURN ( self );
     }
-%}
-.
+%}.
     self primitiveFailed
 !
 
 gcFor:aDrawableId
 
 %{  /* NOCONTEXT */
-
     int screen = _intVal(_INST(screen));
     GC gc;
 
@@ -1767,8 +1764,7 @@
 	END_INTERRUPTSBLOCKED
 	RETURN ( gc ? MKOBJ(gc) : nil );
     }
-%}
-.
+%}.
     self primitiveFailed.
     ^ nil
 !
@@ -4597,7 +4593,7 @@
 !
 
 displayPointX:x y:y in:aDrawableId with:aGCId
-    "draw a point. If x/y are not integers, rounded coordinates are tried." 
+    "draw a point. If x/y are not integers, an error is triggered." 
 
 %{  /* NOCONTEXT */
 
@@ -4738,14 +4734,16 @@
 	RETURN ( self );
     }
 #endif
-%}
-.
+%}.
     self primitiveFailed
 !
 
 copyFromId:sourceId x:srcX y:srcY to:destId x:dstX y:dstY 
 		width:w height:h with:aGCId
-    "do a bit-blt"
+    "do a bit-blt; copy bits from the rectangle defined by
+     srcX/srcY and w/h from the sourceId drawable to the rectangle
+     below dstX/dstY in the destId drawable. Trigger an error if any
+     argument is not integer."
 
 %{  /* NOCONTEXT */
 
@@ -4765,14 +4763,20 @@
 				_intVal(dstX), _intVal(dstY));
 	RETURN ( self );
     }
-%}
-.
+%}.
+    "badGC, bad sourceDrawableId or destDrawableID
+     or any non integer coordinate"
+
     self primitiveFailed
 !
 
 copyPlaneFromId:sourceId x:srcX y:srcY to:destId x:dstX y:dstY 
 		width:w height:h with:aGCId
-    "do a bit-blt"
+    "do a bit-blt, but only copy the low-bit plane; 
+     copy bits from the rectangle defined by
+     srcX/srcY and w/h from the sourceId drawable to the rectangle
+     below dstX/dstY in the destId drawable. Trigger an error if any
+     argument is not integer."
 
 %{  /* NOCONTEXT */
 
@@ -4792,8 +4796,10 @@
 				 _intVal(dstX), _intVal(dstY), 1);
 	RETURN ( self );
     }
-%}
-.
+%}.
+    "badGC, bad sourceDrawableId or destDrawableID
+     or any non integer coordinate"
+
     self primitiveFailed
 !
 
@@ -4910,7 +4916,8 @@
 !
 
 fillPolygon:aPolygon in:aDrawableId with:aGCId
-    "fill a polygon given by its points. If any coordinate is not integer, an error is triggered."
+    "fill a polygon given by its points. 
+     If any coordinate is not integer, an error is triggered."
 
     |numberOfPoints|
 
@@ -4967,6 +4974,14 @@
 		   width:w height:h 
 		    with:aGCId
 
+    "draw a bitImage which has depth id, width iw and height ih into
+     the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
+     Individual source pixels must have imageDepth bits.
+     It has to be checked elsewhere, that the server can do it with the given
+     depth - otherwise, primitive failure will be signalled.
+     Also it is assumed, that the colormap is setup correctly and the
+     colors are allocated - otherwise the colors may be wrong."
+
     ^ self drawBits:imageBits bitsPerPixel:imageDepth depth:imageDepth 
 				     width:imageWidth height:imageHeight 
 					 x:srcx y:srcy
@@ -4975,14 +4990,6 @@
 				     width:w height:h 
 				      with:aGCId
 
-    "draw a bitImage which has depth id, width iw and height ih into
-     the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
-     Individual source pixels must have imageDepth bits.
-     It has to be checked elsewhere, that the server can do it with the given
-     depth - otherwise, primitive failure will be signalled.
-     Also it is assumed, that the colormap is setup correctly and the
-     colors are allocated - otherwise the colors may be wrong."
-
 !
 
 drawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth