--- a/Depth8Image.st Sun Mar 02 14:59:34 2014 +0100
+++ b/Depth8Image.st Sun Mar 02 14:59:37 2014 +0100
@@ -81,15 +81,17 @@
if (__isByteArrayLike(b)
&& __bothSmallInteger(x, y)
&& __isSmallInteger(w) ) {
- int _idx, _pix;
+ int _idx, _pix;
- _idx = (__intVal(w) * __intVal(y)) + __intVal(x);
- if ((unsigned)_idx < __byteArraySize(b)) {
- _pix = __ByteArrayInstPtr(b)->ba_element[_idx];
- RETURN( __MKSMALLINT(_pix) );
- }
+ _idx = (__intVal(w) * __intVal(y)) + __intVal(x);
+ if ((unsigned)_idx < __byteArraySize(b)) {
+ _pix = __ByteArrayInstPtr(b)->ba_element[_idx];
+ RETURN( __MKSMALLINT(_pix) );
+ }
}
%}.
+ 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
@@ -2452,10 +2454,10 @@
!Depth8Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.120 2013-05-21 20:50:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.121 2014-03-02 13:59:37 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.120 2013-05-21 20:50:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Depth8Image.st,v 1.121 2014-03-02 13:59:37 cg Exp $'
! !