--- a/Circle.st Wed May 08 21:06:02 1996 +0200
+++ b/Circle.st Wed May 08 21:06:54 1996 +0200
@@ -60,9 +60,9 @@
center:centerPoint radius:radius
"Return a new Circle."
- | aCircle |
+ ^ self new center:centerPoint radius:radius
- ^ self new center:centerPoint radius:radius
+ "Modified: 8.5.1996 / 20:39:30 / cg"
! !
!Circle methodsFor:'accessing'!
@@ -170,5 +170,5 @@
!Circle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Circle.st,v 1.7 1996-05-08 18:33:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Circle.st,v 1.8 1996-05-08 19:06:41 cg Exp $'
! !
--- a/Polygon.st Wed May 08 21:06:02 1996 +0200
+++ b/Polygon.st Wed May 08 21:06:54 1996 +0200
@@ -145,6 +145,19 @@
vertices := anArrayOfPoints
! !
+!Polygon methodsFor:'converting'!
+
+asPointArray
+ "return an array containing my vertex points.
+ Notice, that no copy of my vertices is created - you should not
+ modify the returned collections points (unless you want to affect
+ the polygon ...)."
+
+ ^ vertices
+
+ "Modified: 8.5.1996 / 20:43:39 / cg"
+! !
+
!Polygon methodsFor:'displaying'!
displayFilledOn:aGC
@@ -312,7 +325,7 @@
]
].
].
- ^ Rectangle origin:(minX @ minY) corner:(maxX @ maxY).
+ ^ Rectangle left:minX top:minY right:maxX bottom:maxY.
"
|p|
@@ -325,7 +338,7 @@
p bounds
"
- "Modified: 8.5.1996 / 14:06:35 / cg"
+ "Modified: 8.5.1996 / 20:51:42 / cg"
!
canBeFilled
@@ -391,5 +404,5 @@
!Polygon class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Polygon.st,v 1.20 1996-05-08 18:33:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Polygon.st,v 1.21 1996-05-08 19:06:54 cg Exp $'
! !
--- a/Spline.st Wed May 08 21:06:02 1996 +0200
+++ b/Spline.st Wed May 08 21:06:54 1996 +0200
@@ -203,6 +203,14 @@
!Spline methodsFor:'converting'!
+asPointArray
+ "return an array containing my approximated vertex points."
+
+ ^ self computeLineSegments
+
+ "Created: 8.5.1996 / 20:44:09 / cg"
+!
+
asPolygon
"return a polygon, approximating the spline"
@@ -423,6 +431,7 @@
steps
a b c d t|
+ lines notNil ifTrue:[ ^ lines].
controlPoints size < 3 ifTrue:[^ controlPoints].
"/ Make sure that the function and its derivatives are up to date.
@@ -461,7 +470,7 @@
^ lines
"Created: 8.5.1996 / 18:44:54 / cg"
- "Modified: 8.5.1996 / 19:33:30 / cg"
+ "Modified: 8.5.1996 / 20:45:10 / cg"
!
validateDerivatives
@@ -505,5 +514,5 @@
!Spline class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Spline.st,v 1.4 1996-05-08 18:33:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Spline.st,v 1.5 1996-05-08 19:06:36 cg Exp $'
! !