#DOCUMENTATION by cg
class: Depth8Image
comment/format in:
#rowAt:into:startingAt:
#rowAt:putAll:startingAt:
--- a/Depth8Image.st Tue Aug 30 17:02:10 2016 +0200
+++ b/Depth8Image.st Tue Aug 30 17:02:38 2016 +0200
@@ -144,23 +144,23 @@
rowAt:y into:aPixelBuffer startingAt:startIndex
"fill aPixelBuffer with pixel values from a single row.
- Notice: row coordinate starts at 0."
+ Notice: row/column coordinates start at 0."
|srcIdx endIndex n|
bytes notNil ifTrue:[
- srcIdx := (y * width) + 1.
- n := width.
+ srcIdx := (y * width) + 1.
+ n := width.
- endIndex := srcIdx+width-1.
- endIndex > bytes size ifTrue:[
- self assert:(bytes size >= endIndex).
- endIndex := bytes size.
- n := endIndex - srcIdx + 1.
- ].
+ endIndex := srcIdx+width-1.
+ endIndex > bytes size ifTrue:[
+ self assert:(bytes size >= endIndex).
+ endIndex := bytes size.
+ n := endIndex - srcIdx + 1.
+ ].
- aPixelBuffer replaceFrom:startIndex to:startIndex+n-1 with:bytes startingAt:srcIdx.
- ^ self.
+ aPixelBuffer replaceFrom:startIndex to:startIndex+n-1 with:bytes startingAt:srcIdx.
+ ^ self.
].
^ super rowAt:y into:aPixelBuffer startingAt:startIndex
@@ -168,9 +168,8 @@
!
rowAt:y putAll:pixelArray startingAt:startIndex
- "store a single rows bits from bits in the pixelArray argument;
- Return the pixelArray.
- Notice: row coordinate starts at 0."
+ "store a single row's bits from bits in the pixelArray argument;
+ Notice: row/column coordinates start at 0."
|dstIdx|