--- a/Form.st Tue Feb 17 20:49:32 1998 +0100
+++ b/Form.st Thu Feb 19 15:49:02 1998 +0100
@@ -833,7 +833,7 @@
inData tmpData info
srcIndex "{ Class: SmallInteger }"
dstIndex "{ Class: SmallInteger }"
- buffer|
+ buffer spaceBitsPerPixel|
data notNil ifTrue:[
^ data
@@ -845,7 +845,18 @@
^ nil
].
- bytesPerLine := (width * depth + 31) // 32 * 4.
+ spaceBitsPerPixel := depth.
+ (depth > 8) ifTrue:[
+ spaceBitsPerPixel := 16.
+ (depth > 16) ifTrue:[
+ spaceBitsPerPixel := 32.
+ (depth > 32) ifTrue:[
+ spaceBitsPerPixel := depth.
+ ]
+ ]
+ ].
+
+ bytesPerLine := (width * spaceBitsPerPixel + 31) // 32 * 4.
inData := ByteArray uninitializedNew:(bytesPerLine * height).
info := device getBitsFromPixmapId:drawableId x:0 y:0 width:width height:height into:inData.
bytesPerLineIn := (info at:#bytesPerLine). "what I got"
@@ -907,7 +918,7 @@
^ inData.
- "Modified: 23.4.1997 / 14:17:08 / cg"
+ "Modified: / 19.2.1998 / 14:47:06 / cg"
!
bits:aByteArray
@@ -1833,6 +1844,6 @@
!Form class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.87 1997-12-04 09:58:01 tz Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.88 1998-02-19 14:49:02 cg Exp $'
! !
Form initialize!