--- a/FillWrpr.st Thu May 09 10:33:21 1996 +0200
+++ b/FillWrpr.st Thu May 09 10:43:59 1996 +0200
@@ -42,6 +42,10 @@
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.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
StrokingWrapper Geometric GraphicsContext
@@ -54,49 +58,84 @@
examples
"
+ wrap an ellipticArc and display it
+ (notice, that no automatic redraw is performed):
[exBegin]
- |v e component|
+ |v e component|
+
+ v := (View extent:250@250) openAndWait.
+
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0
+ sweepAngle:270.
+ component := FillingWrapper on:e.
- v := View extent:250@250.
+ component displayOn:v.
+ [exEnd]
+ wrap an spline and display it
+ (notice, that no automatic redraw is performed):
+ [exBegin]
+ |v s component|
+
+ v := (View extent:250@250) openAndWait.
- e := EllipticalArc boundingBox:(10@10 corner:90@90)
- startAngle:0
- sweepAngle:270.
- v addComponent:(StrokingWrapper on:e).
+ s := Spline controlPoints:
+ (Array with:(20@20)
+ with:(80@80)
+ with:(20@80)
+ with:(20@20)).
+ component := FillingWrapper on:s.
+ component foregroundColor:(Color green darkened).
+ component displayOn:v.
+ [exEnd]
+ wrap ellipticArcs
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
+ [exBegin]
+ |v e component|
- e := EllipticalArc boundingBox:(110@110 corner:190@190)
- startAngle:0
- sweepAngle:270.
- v addComponent:(FillingWrapper on:e).
- v open
+ 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]
+ wrap a rectangle and an ellipticArc,
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
[exBegin]
- |v e component|
+ |v e component|
- v := View new.
- v extent:250@250.
+ v := View new.
+ v extent:250@250.
- e := Rectangle origin:10@10 corner:90@90.
- component := FillingWrapper on:e.
- component foregroundColor:Color red.
+ e := Rectangle origin:10@10 corner:90@90.
+ component := FillingWrapper on:e.
+ component foregroundColor:Color red.
- v addComponent:component.
+ v addComponent:component.
- e := EllipticalArc boundingBox:(10@10 corner:90@90)
- startAngle:0 sweepAngle:270.
- component := StrokingWrapper on:e.
- component lineWidth:5.
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0 sweepAngle:270.
+ component := StrokingWrapper on:e.
+ component lineWidth:5.
- v addComponent:component.
+ v addComponent:component.
- v addComponent:(Button label:'hello').
+ v addComponent:(Button label:'hello').
- v open
+ v open
[exEnd]
"
-
! !
!FillingWrapper methodsFor:'displaying'!
@@ -121,5 +160,5 @@
!FillingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/FillWrpr.st,v 1.4 1996-05-09 08:31:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/FillWrpr.st,v 1.5 1996-05-09 08:43:59 cg Exp $'
! !
--- a/FillingWrapper.st Thu May 09 10:33:21 1996 +0200
+++ b/FillingWrapper.st Thu May 09 10:43:59 1996 +0200
@@ -42,6 +42,10 @@
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.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
StrokingWrapper Geometric GraphicsContext
@@ -54,49 +58,84 @@
examples
"
+ wrap an ellipticArc and display it
+ (notice, that no automatic redraw is performed):
[exBegin]
- |v e component|
+ |v e component|
+
+ v := (View extent:250@250) openAndWait.
+
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0
+ sweepAngle:270.
+ component := FillingWrapper on:e.
- v := View extent:250@250.
+ component displayOn:v.
+ [exEnd]
+ wrap an spline and display it
+ (notice, that no automatic redraw is performed):
+ [exBegin]
+ |v s component|
+
+ v := (View extent:250@250) openAndWait.
- e := EllipticalArc boundingBox:(10@10 corner:90@90)
- startAngle:0
- sweepAngle:270.
- v addComponent:(StrokingWrapper on:e).
+ s := Spline controlPoints:
+ (Array with:(20@20)
+ with:(80@80)
+ with:(20@80)
+ with:(20@20)).
+ component := FillingWrapper on:s.
+ component foregroundColor:(Color green darkened).
+ component displayOn:v.
+ [exEnd]
+ wrap ellipticArcs
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
+ [exBegin]
+ |v e component|
- e := EllipticalArc boundingBox:(110@110 corner:190@190)
- startAngle:0
- sweepAngle:270.
- v addComponent:(FillingWrapper on:e).
- v open
+ 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]
+ wrap a rectangle and an ellipticArc,
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
[exBegin]
- |v e component|
+ |v e component|
- v := View new.
- v extent:250@250.
+ v := View new.
+ v extent:250@250.
- e := Rectangle origin:10@10 corner:90@90.
- component := FillingWrapper on:e.
- component foregroundColor:Color red.
+ e := Rectangle origin:10@10 corner:90@90.
+ component := FillingWrapper on:e.
+ component foregroundColor:Color red.
- v addComponent:component.
+ v addComponent:component.
- e := EllipticalArc boundingBox:(10@10 corner:90@90)
- startAngle:0 sweepAngle:270.
- component := StrokingWrapper on:e.
- component lineWidth:5.
+ e := EllipticalArc boundingBox:(10@10 corner:90@90)
+ startAngle:0 sweepAngle:270.
+ component := StrokingWrapper on:e.
+ component lineWidth:5.
- v addComponent:component.
+ v addComponent:component.
- v addComponent:(Button label:'hello').
+ v addComponent:(Button label:'hello').
- v open
+ v open
[exEnd]
"
-
! !
!FillingWrapper methodsFor:'displaying'!
@@ -121,5 +160,5 @@
!FillingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/FillingWrapper.st,v 1.4 1996-05-09 08:31:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/FillingWrapper.st,v 1.5 1996-05-09 08:43:59 cg Exp $'
! !
--- a/GeomWrpr.st Thu May 09 10:33:21 1996 +0200
+++ b/GeomWrpr.st Thu May 09 10:43:59 1996 +0200
@@ -46,6 +46,10 @@
abstract class for wrappers of geometric objects.
These allows any geometric thingy to be used as a component in a view.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
StrokingWrapper FillingWrapper
Geometric GraphicsContext
@@ -71,5 +75,5 @@
!GeometricWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/GeomWrpr.st,v 1.1 1996-05-09 08:30:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/GeomWrpr.st,v 1.2 1996-05-09 08:43:49 cg Exp $'
! !
--- a/GeometricWrapper.st Thu May 09 10:33:21 1996 +0200
+++ b/GeometricWrapper.st Thu May 09 10:43:59 1996 +0200
@@ -46,6 +46,10 @@
abstract class for wrappers of geometric objects.
These allows any geometric thingy to be used as a component in a view.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
StrokingWrapper FillingWrapper
Geometric GraphicsContext
@@ -71,5 +75,5 @@
!GeometricWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/GeometricWrapper.st,v 1.1 1996-05-09 08:30:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/GeometricWrapper.st,v 1.2 1996-05-09 08:43:49 cg Exp $'
! !
--- a/StrokeWrpr.st Thu May 09 10:33:21 1996 +0200
+++ b/StrokeWrpr.st Thu May 09 10:43:59 1996 +0200
@@ -40,6 +40,10 @@
a wrapper for a geometric object, which is to be drawn stroked.
This allows any geometric thingy to be used as a component in a view.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
FillingWrapper Geometric GraphicsContext
@@ -50,6 +54,8 @@
examples
"
+ wrap an ellipticArc and display it
+ (notice, that no automatic redraw is performed):
[exBegin]
|v e component|
@@ -63,6 +69,9 @@
component displayOn:v.
[exEnd]
+ wrap a rectangle and an ellipticArc,
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
[exBegin]
|v e component|
@@ -164,5 +173,5 @@
!StrokingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.4 1996-05-09 08:33:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.5 1996-05-09 08:43:53 cg Exp $'
! !
--- a/StrokingWrapper.st Thu May 09 10:33:21 1996 +0200
+++ b/StrokingWrapper.st Thu May 09 10:43:59 1996 +0200
@@ -40,6 +40,10 @@
a wrapper for a geometric object, which is to be drawn stroked.
This allows any geometric thingy to be used as a component in a view.
+ (background info: geometrics are mathematical objects - they do not
+ keep any color or lineStyle attributes. Wrappers add this information
+ and can also be used as components of a view)
+
[see also:]
FillingWrapper Geometric GraphicsContext
@@ -50,6 +54,8 @@
examples
"
+ wrap an ellipticArc and display it
+ (notice, that no automatic redraw is performed):
[exBegin]
|v e component|
@@ -63,6 +69,9 @@
component displayOn:v.
[exEnd]
+ wrap a rectangle and an ellipticArc,
+ and add them as components to a View
+ (notice, that doing so makes the redraw automatic):
[exBegin]
|v e component|
@@ -164,5 +173,5 @@
!StrokingWrapper class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.4 1996-05-09 08:33:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.5 1996-05-09 08:43:53 cg Exp $'
! !
--- a/VisualPart.st Thu May 09 10:33:21 1996 +0200
+++ b/VisualPart.st Thu May 09 10:43:59 1996 +0200
@@ -27,13 +27,32 @@
graphicsContext
"return the graphicsContext"
- ^ container gc
+ ^ container graphicsContext
"Created: 9.5.1996 / 00:32:12 / cg"
+ "Modified: 9.5.1996 / 01:37:10 / cg"
+!
+
+graphicsDevice
+ "return the graphicsContext"
+
+ ^ container graphicsDevice
+
+ "Created: 9.5.1996 / 00:32:12 / cg"
+ "Modified: 9.5.1996 / 01:37:03 / cg"
+!
+
+topComponent
+ "return the top component - typically the topView"
+
+ ^ container topComponent
+
+ "Modified: 9.5.1996 / 01:37:10 / cg"
+ "Created: 9.5.1996 / 01:39:15 / cg"
! !
!VisualPart class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/VisualPart.st,v 1.1 1996-05-08 23:11:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/VisualPart.st,v 1.2 1996-05-09 08:43:43 cg Exp $'
! !