--- a/GraphicsContext.st Thu Apr 24 13:32:31 1997 +0200
+++ b/GraphicsContext.st Thu Apr 24 16:04:44 1997 +0200
@@ -1118,19 +1118,27 @@
"Modified: 8.5.1996 / 08:36:03 / cg"
!
-displayForm:aForm at:aPoint
- "draw a form"
+displayForm:aFormOrImage at:aPoint
+ "draw a form (or image)"
- self displayForm:aForm x:(aPoint x) y:(aPoint y)
+ self displayForm:aFormOrImage x:(aPoint x) y:(aPoint y)
+
+ "Modified: 24.4.1997 / 16:00:11 / cg"
!
-displayForm:aForm x:x y:y
- "draw a form at x/y; if the form has depth 1, 1's in the form are
+displayForm:aFormOrImage x:x y:y
+ "draw a form (or image) at x/y;
+ if the form has depth 1, 1's in the form are
drawn in current paint color, 0's are ignored.
- If the form has depth ~~ 1, the result is undefined"
+ If the form has depth ~~ 1, the current fg color setting is ignored."
|fg bg f noColor|
+ aFormOrImage depth > 1 ifTrue:[
+ self displayOpaqueForm:aFormOrImage x:x y:y.
+ ^ self.
+ ].
+
fg := paint.
bg := bgPaint.
f := function.
@@ -1141,19 +1149,41 @@
].
noColor := Color noColor.
+
"
stamp out fg-pixels
"
self paint:noColor on:Color allColor function:#and.
- self displayOpaqueForm:aForm x:x y:y.
+ self displayOpaqueForm:aFormOrImage x:x y:y.
+
"
or-in fg-pixels
"
self paint:fg on:Color noColor function:#or.
- self displayOpaqueForm:aForm x:x y:y.
+ self displayOpaqueForm:aFormOrImage x:x y:y.
self paint:fg on:fg function:f.
- "Modified: 28.5.1996 / 17:10:28 / cg"
+ "Modified: 24.4.1997 / 16:01:43 / cg"
+!
+
+displayImage:aFormOrImage at:aPoint
+ "draw an image (or form).
+ Provided for ST-80 compatibilty;
+ in ST/X, images are also handled by #displayForm:"
+
+ self displayForm:aFormOrImage x:(aPoint x) y:(aPoint y)
+
+ "Modified: 24.4.1997 / 16:02:43 / cg"
+!
+
+displayImage:aFormOrImage x:x y:y
+ "draw an image (or form).
+ Provided for ST-80 compatibilty;
+ in ST/X, images are also handled by #displayForm:"
+
+ self displayForm:aFormOrImage x:x y:y
+
+ "Created: 24.4.1997 / 16:03:03 / cg"
!
displayLineFrom:point1 to:point2
@@ -1849,6 +1879,6 @@
!GraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.58 1997-04-24 10:51:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.59 1997-04-24 14:04:44 cg Exp $'
! !
GraphicsContext initialize!