FillingWrapper.st
changeset 245 8d7f9a8d2c78
child 246 9f80dbcbcd34
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FillingWrapper.st	Thu May 09 00:02:28 1996 +0200
@@ -0,0 +1,120 @@
+"
+ COPYRIGHT (c) 1996 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+
+
+Wrapper subclass:#FillingWrapper
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Graphics-Display Objects'
+!
+
+!FillingWrapper class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+
+!
+
+documentation
+"
+    a wrapper for a geometric object, which is to be drawn filled.
+    This allows any geometric thingy to be used as a filled component in a view.
+
+    [author:]
+        Claus Gittinger
+"
+
+
+!
+
+examples
+"
+                                                                        [exBegin]
+        |v e component|
+
+        v := View extent:250@250.
+
+        e := EllipticalArc boundingBox:(10@10 corner:90@90)
+                            startAngle:0 
+                            sweepAngle:270.
+        v addComponent:(StrokingWrapper on:e).
+
+        e := EllipticalArc boundingBox:(110@110 corner:190@190)
+                            startAngle:0 
+                            sweepAngle:270.
+        v addComponent:(FillingWrapper on:e).
+        v open
+                                                                        [exEnd]
+
+
+                                                                        [exBegin]
+        |v e component|
+
+        v := View new.
+        v extent:250@250.
+
+        e := Rectangle origin:10@10 corner:90@90.
+        component := FillingWrapper on:e.
+        component foregroundColor:Color red.
+
+        v addComponent:component.
+
+        e := EllipticalArc boundingBox:(10@10 corner:90@90)
+                         startAngle:0 sweepAngle:270.
+        component := StrokingWrapper on:e.
+        component lineWidth:5.
+
+        v addComponent:component.
+
+        v addComponent:(Button label:'hello').
+
+        v open
+                                                                        [exEnd]
+"
+
+! !
+
+!FillingWrapper methodsFor:'displaying'!
+
+displayOn:aGC
+    |prevFg|
+
+    prevFg := aGC paint.
+
+    aGC paint:fgColor.
+
+    component displayFilledOn:aGC.
+
+    aGC paint:prevFg.
+
+    "Modified: 8.5.1996 / 23:48:49 / cg"
+    "Created: 8.5.1996 / 23:54:06 / cg"
+! !
+
+!FillingWrapper class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libview2/FillingWrapper.st,v 1.1 1996-05-08 22:02:28 cg Exp $'
+! !