--- a/GLXWorkstat.st Sat Mar 23 17:02:50 1996 +0100
+++ b/GLXWorkstat.st Sat Mar 23 19:42:29 1996 +0100
@@ -3299,12 +3299,36 @@
idx := 1.
y1 to:y2 do:[:y |
x1 to:x2 do:[:x |
- dest at:idx put:(super getPixelX:x y:y from:aGLXWindowId)
+ |pix|
+
+ pix := super getPixelX:x y:y from:aGLXWindowId.
+ "/
+ "/ mhmh - this pixel is indexing X's colorMap;
+ "/ still have to find the GL mapping ...
+ "/
+ pix := self glxXColorToGLColor:pix.
+
+ dest at:idx put:pix
]
].
^ n
"Modified: 22.3.1996 / 18:08:00 / cg"
+
+!
+
+glxXColorToGLColor:pixel
+ "only for VOGL: given a pixel as read from the view,
+ return the corresponding GL color"
+
+%{ /* NOCONTEXT */
+#ifdef VGL
+ if (__isSmallInteger(pixel)) {
+ RETURN (__MKSMALLINT(X11_invColor(__intVal(pixel))));
+ }
+#endif
+%}.
+ ^ pixel
! !
!GLXWorkstation methodsFor:'points'!
@@ -8280,5 +8304,5 @@
!GLXWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.51 1996-03-23 16:02:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.52 1996-03-23 18:42:29 cg Exp $'
! !
--- a/GLXWorkstation.st Sat Mar 23 17:02:50 1996 +0100
+++ b/GLXWorkstation.st Sat Mar 23 19:42:29 1996 +0100
@@ -3299,12 +3299,36 @@
idx := 1.
y1 to:y2 do:[:y |
x1 to:x2 do:[:x |
- dest at:idx put:(super getPixelX:x y:y from:aGLXWindowId)
+ |pix|
+
+ pix := super getPixelX:x y:y from:aGLXWindowId.
+ "/
+ "/ mhmh - this pixel is indexing X's colorMap;
+ "/ still have to find the GL mapping ...
+ "/
+ pix := self glxXColorToGLColor:pix.
+
+ dest at:idx put:pix
]
].
^ n
"Modified: 22.3.1996 / 18:08:00 / cg"
+
+!
+
+glxXColorToGLColor:pixel
+ "only for VOGL: given a pixel as read from the view,
+ return the corresponding GL color"
+
+%{ /* NOCONTEXT */
+#ifdef VGL
+ if (__isSmallInteger(pixel)) {
+ RETURN (__MKSMALLINT(X11_invColor(__intVal(pixel))));
+ }
+#endif
+%}.
+ ^ pixel
! !
!GLXWorkstation methodsFor:'points'!
@@ -8280,5 +8304,5 @@
!GLXWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.51 1996-03-23 16:02:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.52 1996-03-23 18:42:29 cg Exp $'
! !