Form.st
changeset 12 9f0995fac1fa
parent 6 7ee0cfde237d
child 24 e810b1be068b
--- a/Form.st	Sat Dec 11 02:34:56 1993 +0100
+++ b/Form.st	Sat Dec 11 02:36:44 1993 +0100
@@ -27,7 +27,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Form.st,v 1.4 1993-10-13 02:43:24 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.5 1993-12-11 01:28:44 claus Exp $
 written spring/summer 89 by claus
 '!
 
@@ -77,6 +77,14 @@
     ]
 ! !
 
+!Form class methodsFor:'cleanup'!
+
+lowSpaceCleanup
+    "cleanup in low-memory situations"
+
+    DitherPatterns := nil
+! !
+
 !Form methodsFor:'instance release'!
 
 disposed
@@ -1144,7 +1152,7 @@
 
     "this is a very slow operation - every pixel is fetched from
      the device.
-     This MUST be replaced by code basied on getImage ....
+     This MUST be replaced by code based on getImage ....
     "
 
     (depth == 8) ifTrue:[
@@ -1190,6 +1198,13 @@
     ^ pixelArray
 !
 
+forgetBits
+    "for image, which also keeps the bits - so there is
+     no need to hold them again here"
+
+    data := nil
+!
+
 photometric
     "for compatibility with Image class ..."
 
@@ -1209,10 +1224,14 @@
 !
 
 samplesperPixel
+    "for compatibility with Image class ..."
+
     ^ 1
 !
 
 bitsPerSample
+    "for compatibility with Image class ..."
+
     ^ Array with:depth
 ! !
 
@@ -1228,7 +1247,7 @@
     mY := extent y.
     ((mX = 1) and:[mY = 1]) ifTrue:[^ self].
 
-    ((mX isKindOf:SmallInteger) and:[mY isKindOf:SmallInteger]) ifFalse:[
+    ((mX isMemberOf:SmallInteger) and:[mY isMemberOf:SmallInteger]) ifFalse:[
         ^ self hardMagnifyBy:extent
     ].
 
@@ -1269,8 +1288,8 @@
     "ScrollBar scrollUpButtonForm magnifyBy:(2 @ 2)"
 !
 
-mirrorV
-    "return a new form mirrored vertically"
+flipVertical
+    "return a new form flipped vertically"
 
     |dstX newForm|
     newForm := ((self class) on:device)
@@ -1289,8 +1308,8 @@
     ^ newForm
 !
 
-mirrorH
-    "return a new form mirrored horizontally"
+flipHorizontal
+    "return a new form flipped horizontally"
 
     |dstY newForm|
     newForm := ((self class) on:device)