checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 07 Dec 1995 12:18:40 +0100
changeset 281 4f04a56b1641
parent 280 c89f1cb9e8b9
child 282 fe2d82f516f1
checkin from browser
Depth16Image.st
--- a/Depth16Image.st	Thu Dec 07 12:17:07 1995 +0100
+++ b/Depth16Image.st	Thu Dec 07 12:18:40 1995 +0100
@@ -33,10 +33,6 @@
 "
 !
 
-version
-    ^ '$Header: /cvs/stx/stx/libview/Depth16Image.st,v 1.2 1995-11-11 15:49:03 cg Exp $'
-!
-
 documentation
 "
     this class represents 16 bit images.
@@ -53,6 +49,33 @@
     ^ 16
 ! !
 
+!Depth16Image methodsFor:'accessing'!
+
+atX:x y:y putValue:aPixelValue
+    "set the pixel at x/y to aPixelValue.
+     Pixels start at x=0 , y=0 for upper left pixel, end at
+     x = width-1, y=height-1 for lower right pixel"
+
+    |lineIndex "{ Class: SmallInteger }"|
+
+    lineIndex := (width * 2 * y) + 1.
+
+    bytes wordAt:(lineIndex + (x * 2)) put:aPixelValue MSB:true
+!
+
+valueAtX:x y:y
+    "retrieve a pixel at x/y; return a pixelValue.
+     Pixels start at x=0 , y=0 for upper left pixel, end at
+     x = width-1, y=height-1 for lower right pixel"
+
+    |lineIndex "{ Class: SmallInteger }"|
+
+    lineIndex := (width * 2 * y) + 1.
+
+    "left pixel in high bits"
+    ^ bytes wordAt:(lineIndex + (x * 2)) MSB:true.
+! !
+
 !Depth16Image methodsFor:'queries'!
 
 bitsPerPixel
@@ -86,29 +109,8 @@
     ^ 1
 ! !
 
-!Depth16Image methodsFor:'accessing'!
-
-valueAtX:x y:y
-    "retrieve a pixel at x/y; return a pixelValue.
-     Pixels start at x=0 , y=0 for upper left pixel, end at
-     x = width-1, y=height-1 for lower right pixel"
-
-    |lineIndex "{ Class: SmallInteger }"|
-
-    lineIndex := (width * 2 * y) + 1.
+!Depth16Image class methodsFor:'documentation'!
 
-    "left pixel in high bits"
-    ^ bytes wordAt:(lineIndex + (x * 2)) MSB:true.
-!
-
-atX:x y:y putValue:aPixelValue
-    "set the pixel at x/y to aPixelValue.
-     Pixels start at x=0 , y=0 for upper left pixel, end at
-     x = width-1, y=height-1 for lower right pixel"
-
-    |lineIndex "{ Class: SmallInteger }"|
-
-    lineIndex := (width * 2 * y) + 1.
-
-    bytes wordAt:(lineIndex + (x * 2)) put:aPixelValue MSB:true
+version
+    ^ '$Header: /cvs/stx/stx/libview/Depth16Image.st,v 1.3 1995-12-07 11:18:40 cg Exp $'
 ! !