--- a/Image.st Mon Dec 22 15:33:07 2008 +0100
+++ b/Image.st Mon Dec 22 15:33:22 2008 +0100
@@ -9308,6 +9308,24 @@
"Modified: 7.6.1996 / 19:13:30 / cg"
!
+colorsAtX:x from:y1 to:y2 do:aBlock
+ "perform aBlock for each pixel from y1 to y2 in col x.
+ The block is passed the color at each pixel.
+ The code here provides a generic and slow implementation, and
+ should be redefined in concrete subclasses, to avoid some processing
+ when going from pixel to pixel (i.e. the byte-index and mask computations
+ and also the color allocation)."
+
+ |yStart "{Class: SmallInteger }"
+ yEnd "{Class: SmallInteger }"|
+
+ yStart := y1.
+ yEnd := y2.
+ yStart to:yEnd do:[:yRun |
+ aBlock value:yRun value:(self colorAtX:x y:yRun)
+ ]
+!
+
colorsAtY:y from:x1 to:x2 do:aBlock
"perform aBlock for each pixel from x1 to x2 in row y.
The block is passed the color at each pixel.
@@ -14049,7 +14067,7 @@
!Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.417 2008-12-16 17:34:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.418 2008-12-22 14:33:22 cg Exp $'
! !
Image initialize!