Depth1Image.st
changeset 6303 fe26e0d67023
parent 6066 62426e8110ae
child 6380 816c489b5e41
--- a/Depth1Image.st	Sun Mar 02 14:59:52 2014 +0100
+++ b/Depth1Image.st	Sun Mar 02 14:59:54 2014 +0100
@@ -83,22 +83,24 @@
     OBJ w = __INST(width);
 
     if (__bothSmallInteger(x, y) && __isSmallInteger(w)) {
-	if (__isByteArrayLike(b)) {
-	    int _w = __intVal(w);
-	    int _y = __intVal(y);
-	    int _x = __intVal(x);
-	    unsigned _byte;
-	    int _idx;
+        if (__isByteArrayLike(b)) {
+            int _w = __intVal(w);
+            int _y = __intVal(y);
+            int _x = __intVal(x);
+            unsigned _byte;
+            int _idx;
 
-	    _idx = ((_w + 7) >> 3) * _y + (_x >> 3);
-	    if ((unsigned)_idx < __byteArraySize(b)) {
-		_byte = __ByteArrayInstPtr(b)->ba_element[_idx];
-		RETURN( (_byte & (0x80 >> (_x & 7))) ? __MKSMALLINT(1) : __MKSMALLINT(0) );
-	    }
-	}
+            _idx = ((_w + 7) >> 3) * _y + (_x >> 3);
+            if ((unsigned)_idx < __byteArraySize(b)) {
+                _byte = __ByteArrayInstPtr(b)->ba_element[_idx];
+                RETURN( (_byte & (0x80 >> (_x & 7))) ? __MKSMALLINT(1) : __MKSMALLINT(0) );
+            }
+        }
     }
 %}.
 
+    pixelFunction notNil ifTrue:[^ pixelFunction value:x value:y].
+
     "/ the code below is only evaluated if the bytes-collection is
     "/ not a ByteArray, or the arguments are not integers
 
@@ -772,9 +774,10 @@
 !Depth1Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.58 2013-05-21 20:50:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.59 2014-03-02 13:59:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.58 2013-05-21 20:50:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.59 2014-03-02 13:59:54 cg Exp $'
 ! !
+