--- a/Form.st Mon Feb 06 01:30:10 1995 +0100
+++ b/Form.st Mon Feb 06 01:38:04 1995 +0100
@@ -26,7 +26,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Form.st,v 1.14 1994-11-28 21:00:51 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.15 1995-02-06 00:36:22 claus Exp $
'!
!Form class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
version
"
-$Header: /cvs/stx/stx/libview/Form.st,v 1.14 1994-11-28 21:00:51 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.15 1995-02-06 00:36:22 claus Exp $
"
!
@@ -287,6 +287,12 @@
"return a constant usable as bitblt-combinationrule"
^ #xor
+!
+
+and
+ "return a constant usable as bitblt-combinationrule"
+
+ ^ #and
! !
!Form class methodsFor:'instance creation'!
@@ -303,6 +309,13 @@
^ newForm
!
+extent:ext offset:anOffset
+ "create a new, cleared form, take dimensions from ext.
+ Smalltalk-80 compatibility"
+
+ ^ (self extent:ext) offset:anOffset.
+!
+
extent:ext fromArray:data offset:offs
"create a new form, take dimensions from ext, bits from data.
Smalltalk-80 compatibility."
@@ -1599,11 +1612,30 @@
^ offset
!
+displayOn:aGC rule:rule
+ "draw in aGC.
+ Smalltalk-80 (2.x) compatibility"
+
+ ^ self displayOn:aGC at:0@0 rule:rule
+!
+
+displayOn:aGC at:aPoint rule:rule
+ "draw in aGC.
+ Smalltalk-80 (2.x) compatibility"
+
+ |f|
+
+ f := aGC function.
+ aGC function:rule.
+ aGC displayOpaqueForm:self x:aPoint x y:aPoint y.
+ aGC function:f.
+!
+
displayOn:aGC at:aPoint
"draw in aGC.
- Smalltalk-80 compatibility"
+ Smalltalk-80 (2.x) compatibility"
- aGC displayOpaqueForm:self x:aPoint x y:aPoint y
+ ^ self displayOn:aGC at:aPoint rule:#copy
! !
!Form methodsFor:'accessing'!
@@ -1809,6 +1841,23 @@
"ScrollBar scrollUpButtonForm magnifyBy:(2 @ 2)"
!
+hardMagnifyBy:extent
+ "return a new form magnified by extent, aPoint.
+ This method handles non-integral factors."
+
+ "
+ since Form will be replaced by Image in the long run,
+ and this operation is slow anyway, use the implementation
+ in Image for this."
+
+ ^ ((Image fromForm:self) magnifyBy:extent) asFormOn:device.
+
+ "
+ (Form fromFile:'OutputOn.64') magnifyBy:0.5@0.5
+ (Form fromFile:'OutputOn.64') magnifyBy:1.5@1.5
+ "
+!
+
flipVertical
"return a new form flipped vertically"