--- a/Depth1Image.st Sat Apr 02 19:45:37 2016 +0200
+++ b/Depth1Image.st Sat Apr 02 19:46:26 2016 +0200
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libview' }"
+"{ NameSpace: Smalltalk }"
+
Image subclass:#Depth1Image
instanceVariableNames:''
classVariableNames:''
@@ -82,19 +84,20 @@
OBJ b = __INST(bytes);
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 (__bothSmallInteger(x, y)
+ && __isSmallInteger(w)
+ && __isByteArrayLike(b)
+ && (__INST(pixelFunction)==nil) ) {
+ 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) );
}
}
%}.
@@ -781,10 +784,10 @@
!Depth1Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.65 2014-06-05 15:41:27 stefan Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.65 2014-06-05 15:41:27 stefan Exp $'
+ ^ '$Header$'
! !