--- a/GraphicsContext.st Sat Jan 08 18:12:58 1994 +0100
+++ b/GraphicsContext.st Sat Jan 08 18:17:39 1994 +0100
@@ -43,7 +43,7 @@
implemented by subclasses (some subclasses also redefine the others for
more performance)
-$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.5 1993-12-11 01:28:58 claus Exp $
+$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.6 1994-01-08 17:15:42 claus Exp $
Instance variables:
@@ -525,9 +525,23 @@
drawForm:aForm x:x y:y
"draw a form at x/y; if the form has depth 1, 1's in the form are
drawn in current fg, 0's are ignored.
- If the form has depth ~~ 1, it is copied as is onto the receiver"
+ If the form has depth ~~ 1, the result is undefined"
+
+ |fg bg f|
+
+ fg := foreground.
+ bg := background.
+ f := function.
+ self foreground:(Color noColor) background:(Color allColor) function:#and.
+ self drawOpaqueForm:aForm x:x y:y.
+ self foreground:fg background:(Color noColor) function:#or.
+ self drawOpaqueForm:aForm x:x y:y.
+ self foreground:fg background:fg function:f.
+
+"
^ self subclassResponsibility
+"
!
drawOpaqueForm:aForm x:x y:y
@@ -576,16 +590,16 @@
self displayString:aString x:aPoint x y:aPoint y
!
-drawPointX:x y:y
+displayPointX:x y:y
"draw a point at x/y"
self displayLineFromX:x y:y toX:x y:y
!
-drawPoint:aPoint
+displayPoint:aPoint
"draw a pixel"
- self drawPointX:(aPoint x) y:(aPoint y)
+ self displayPointX:(aPoint x) y:(aPoint y)
!
displayLineFrom:point1 to:point2