--- a/XWorkstation.st Thu Jan 22 14:04:42 1998 +0100
+++ b/XWorkstation.st Thu Jan 22 14:19:51 1998 +0100
@@ -3704,12 +3704,12 @@
!
primDrawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth padding:bitPadding
- width:imageWidth height:imageHeight
- x:srcx y:srcy
- into:aDrawableId
- x:dstx y:dsty
- width:w height:h
- with:aGCId
+ width:imageWidth height:imageHeight
+ x:srcx y:srcy
+ into:aDrawableId
+ x:dstx y:dsty
+ width:w height:h
+ with:aGCId
"since XPutImage may allocate huge amount of stack space
(some implementations use alloca), this must run with unlimited stack."
@@ -3735,58 +3735,58 @@
&& __bothSmallInteger(imageDepth, bitsPerPixel)
&& __isSmallInteger(bitPadding)
&& __isByteArray(imageBits)) {
- Display *dpy = myDpy;
- int pad = __intVal(bitPadding);
-
- gc = _GCVal(aGCId);
- win = _WindowVal(aDrawableId);
- if (! gc || !win)
- goto fail;
+ Display *dpy = myDpy;
+ int pad = __intVal(bitPadding);
+
+ gc = _GCVal(aGCId);
+ win = _WindowVal(aDrawableId);
+ if (! gc || !win)
+ goto fail;
#ifdef ARGDEBUG
- printf("args ok\n");
+ printf("args ok\n");
#endif
- image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
- image.width = imgWdth = __intVal(imageWidth);
- image.height = __intVal(imageHeight);
- image.xoffset = 0;
- image.format = ZPixmap;
- image.byte_order = MSBFirst;
- image.bitmap_unit = 8;
- image.bitmap_bit_order = MSBFirst;
- image.bitmap_pad = 8;
- image.depth = __intVal(imageDepth);
- image.bits_per_pixel = __intVal(bitsPerPixel);
-
- image.bytes_per_line = ((((imgWdth * image.bits_per_pixel) + (pad-1)) / pad) * pad) / 8;
-
- switch (image.bits_per_pixel) {
- case 1:
- case 2:
- case 4:
- case 8:
- case 16:
- case 24:
- case 32:
- break;
-
- default:
+ image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
+ image.width = imgWdth = __intVal(imageWidth);
+ image.height = __intVal(imageHeight);
+ image.xoffset = 0;
+ image.format = ZPixmap;
+ image.byte_order = MSBFirst;
+ image.bitmap_unit = 8;
+ image.bitmap_bit_order = MSBFirst;
+ image.bitmap_pad = pad;
+ image.depth = __intVal(imageDepth);
+ image.bits_per_pixel = __intVal(bitsPerPixel);
+
+ image.bytes_per_line = ((((imgWdth * image.depth) + (pad-1)) / pad) * pad) / 8;
+
+ switch (image.bits_per_pixel) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 24:
+ case 32:
+ break;
+
+ default:
#ifdef ARGDEBUG
- printf("bits_per_pixel=%d\n",image.bits_per_pixel);
+ printf("bits_per_pixel=%d\n",image.bits_per_pixel);
#endif
- goto fail;
- }
-
- image.red_mask = 0xFFFF;
- image.green_mask = 0xFFFF;
- image.blue_mask = 0xFFFF;
-
- ENTER_XLIB();
- XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
- __intVal(dstx), __intVal(dsty),
- __intVal(w), __intVal(h));
- LEAVE_XLIB();
-
- RETURN ( true );
+ goto fail;
+ }
+
+ image.red_mask = 0xFFFF;
+ image.green_mask = 0xFFFF;
+ image.blue_mask = 0xFFFF;
+
+ /* ENTER_XLIB(); */
+ XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
+ __intVal(dstx), __intVal(dsty),
+ __intVal(w), __intVal(h));
+ /* LEAVE_XLIB(); */
+
+ RETURN ( true );
}
#ifdef ARGDEBUG
if (!! __isExternalAddress(aGCId)) printf("GC\n");
@@ -9864,6 +9864,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.274 1998-01-21 00:02:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.275 1998-01-22 13:19:51 tz Exp $'
! !
XWorkstation initialize!