--- a/GLXWorkstation.st Sat Mar 23 17:01:35 1996 +0100
+++ b/GLXWorkstation.st Sat Mar 23 17:02:50 1996 +0100
@@ -1293,7 +1293,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
popattributes();
- RETURN (true);
%}
"Modified: 19.3.1996 / 18:42:53 / cg"
@@ -1305,7 +1304,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
pushattributes();
- RETURN (true);
%}
"Modified: 19.3.1996 / 18:43:04 / cg"
@@ -1436,7 +1434,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
clear();
- RETURN (true);
%}
!
@@ -1711,7 +1708,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
bgnline();
- RETURN (true);
%}
!
@@ -2732,7 +2728,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
popmatrix();
- RETURN (true);
%}
!
@@ -2742,7 +2737,6 @@
%{ /* NOCONTEXT */
SETWIN(aGLXWindowId)
pushmatrix();
- RETURN (true);
%}
! !
@@ -3259,7 +3253,7 @@
^ false
!
-glxRectreadX1:x1 y1:y1 x2:x2 y2:y2 to:dest in:aGLXWindowId
+glxRectreadX1:x1 y1:y1 x2:x2 y2:y2 h:viewHeight to:dest in:aGLXWindowId
"read pixels from a rectanglular area.
Dest must be an array and gets pixel values assigned,
reading n*m pixels.
@@ -3267,7 +3261,12 @@
Caveat: the number of pixels is limited to 256.
In double buffer mode, the backBuffer is read."
- |n idx|
+ |n idx sy1 sy2|
+
+ "/ GLX's y coordinates go bottom to top ...
+
+ sy1 := viewHeight - y1.
+ sy2 := viewHeight - y2.
n := (x2 - x1 + 1) * (y2 - y1 + 1).
n > 256 ifTrue:[^ 0].
@@ -3280,11 +3279,11 @@
if (__isArray(dest)
&& __isSmallInteger(x1) && __isSmallInteger(x2)
- && __isSmallInteger(y1) && __isSmallInteger(y2)
+ && __isSmallInteger(sy1) && __isSmallInteger(sy2)
) {
SETWIN(aGLXWindowId)
- nRead = rectread(__intVal(x1), __intVal(y1),
- __intVal(x2), __intVal(y2),
+ nRead = rectread(__intVal(x1), __intVal(sy1),
+ __intVal(x2), __intVal(sy2),
buffer);
for (i=0; i<nRead;i++) {
__ArrayInstPtr(dest)->a_element[i] = __MKSMALLINT(buffer[i]);
@@ -8281,5 +8280,5 @@
!GLXWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.50 1996-03-22 18:40:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.51 1996-03-23 16:02:50 cg Exp $'
! !