checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 17 May 1996 11:23:44 +0200
changeset 346 d263792e62f9
parent 345 062032f9e401
child 347 6f50e1be3ba4
checkin from browser
Curve.st
EllArc.st
EllipticalArc.st
--- a/Curve.st	Thu May 16 12:38:17 1996 +0200
+++ b/Curve.st	Fri May 17 11:23:44 1996 +0200
@@ -117,6 +117,14 @@
     ^ self new start:startPoint middle:middlePoint end:endPoint
 
     "Created: 8.5.1996 / 21:19:30 / cg"
+!
+
+with:startPoint with:middlePoint with:endPoint
+    "return a new curve, passing through the three given points"
+
+    ^ self new start:startPoint middle:middlePoint end:endPoint
+
+    "Created: 17.5.1996 / 10:22:47 / cg"
 ! !
 
 !Curve methodsFor:'accessing'!
@@ -236,5 +244,5 @@
 !Curve class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Curve.st,v 1.3 1996-05-12 23:05:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Curve.st,v 1.4 1996-05-17 09:23:28 cg Exp $'
 ! !
--- a/EllArc.st	Thu May 16 12:38:17 1996 +0200
+++ b/EllArc.st	Fri May 17 11:23:44 1996 +0200
@@ -159,24 +159,61 @@
     "Return a new Circle."
 
     ^ self new center:centerPoint radius:radius
+!
+
+center:centerPoint radius:radius startAngle:startAngle endAngle:endAngle
+    "Return a new (circular) Arc."
+
+    ^ (self new center:centerPoint radius:radius)
+        startAngle:startAngle; sweepAngle:(endAngle - startAngle)
+
+    "Created: 17.5.1996 / 09:58:36 / cg"
+    "Modified: 17.5.1996 / 09:59:16 / cg"
+!
+
+center:centerPoint radius:radius startAngle:startAngle sweepAngle:sweepAngle
+    "Return a new (circular) Arc."
+
+    ^ (self new center:centerPoint radius:radius)
+        startAngle:startAngle; sweepAngle:sweepAngle
+
+    "Created: 17.5.1996 / 09:59:08 / cg"
 ! !
 
 !EllipticalArc methodsFor:'accessing'!
 
 boundingBox:aRectangle
-    "set the center and radius, given a bounding rectangle"
+    "setup the arc, given a bounding rectangle"
 
     boundingBox := aRectangle.
     startAngle := 0.
     sweepAngle := 360
+
+    "Modified: 17.5.1996 / 10:05:06 / cg"
 !
 
 boundingBox:aRectangle startAngle:start sweepAngle:sweep
-    "set the center, radius, start and endAngle, given a bounding rectangle"
+    "setup the arc, given a bounding rectangle, start and endAngle"
 
     boundingBox := aRectangle.
     startAngle := start.
     sweepAngle := sweep
+
+    "Modified: 17.5.1996 / 10:05:27 / cg"
+!
+
+center:centerPoint radius:radius
+    "setup for a circular arc, given center and radius"
+
+    boundingBox := Rectangle
+                        left:(centerPoint x - radius)
+                        top:(centerPoint y - radius)
+                        width:(radius * 2)
+                        height:(radius * 2).
+    startAngle := 0.
+    sweepAngle := 360.
+
+    "Created: 17.5.1996 / 10:07:35 / cg"
 !
 
 endAngle
@@ -265,5 +302,5 @@
 !EllipticalArc class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Attic/EllArc.st,v 1.10 1996-05-12 23:06:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Attic/EllArc.st,v 1.11 1996-05-17 09:23:44 cg Exp $'
 ! !
--- a/EllipticalArc.st	Thu May 16 12:38:17 1996 +0200
+++ b/EllipticalArc.st	Fri May 17 11:23:44 1996 +0200
@@ -159,24 +159,61 @@
     "Return a new Circle."
 
     ^ self new center:centerPoint radius:radius
+!
+
+center:centerPoint radius:radius startAngle:startAngle endAngle:endAngle
+    "Return a new (circular) Arc."
+
+    ^ (self new center:centerPoint radius:radius)
+        startAngle:startAngle; sweepAngle:(endAngle - startAngle)
+
+    "Created: 17.5.1996 / 09:58:36 / cg"
+    "Modified: 17.5.1996 / 09:59:16 / cg"
+!
+
+center:centerPoint radius:radius startAngle:startAngle sweepAngle:sweepAngle
+    "Return a new (circular) Arc."
+
+    ^ (self new center:centerPoint radius:radius)
+        startAngle:startAngle; sweepAngle:sweepAngle
+
+    "Created: 17.5.1996 / 09:59:08 / cg"
 ! !
 
 !EllipticalArc methodsFor:'accessing'!
 
 boundingBox:aRectangle
-    "set the center and radius, given a bounding rectangle"
+    "setup the arc, given a bounding rectangle"
 
     boundingBox := aRectangle.
     startAngle := 0.
     sweepAngle := 360
+
+    "Modified: 17.5.1996 / 10:05:06 / cg"
 !
 
 boundingBox:aRectangle startAngle:start sweepAngle:sweep
-    "set the center, radius, start and endAngle, given a bounding rectangle"
+    "setup the arc, given a bounding rectangle, start and endAngle"
 
     boundingBox := aRectangle.
     startAngle := start.
     sweepAngle := sweep
+
+    "Modified: 17.5.1996 / 10:05:27 / cg"
+!
+
+center:centerPoint radius:radius
+    "setup for a circular arc, given center and radius"
+
+    boundingBox := Rectangle
+                        left:(centerPoint x - radius)
+                        top:(centerPoint y - radius)
+                        width:(radius * 2)
+                        height:(radius * 2).
+    startAngle := 0.
+    sweepAngle := 360.
+
+    "Created: 17.5.1996 / 10:07:35 / cg"
 !
 
 endAngle
@@ -265,5 +302,5 @@
 !EllipticalArc class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/EllipticalArc.st,v 1.10 1996-05-12 23:06:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/EllipticalArc.st,v 1.11 1996-05-17 09:23:44 cg Exp $'
 ! !