Rectangle.st
branchjv
changeset 17784 a617fb53fc72
parent 17761 b0e5971141bc
child 17807 06cc6c49e291
--- a/Rectangle.st	Tue Jul 20 11:55:14 2010 +0100
+++ b/Rectangle.st	Tue Jul 20 12:11:45 2010 +0100
@@ -656,6 +656,24 @@
     width := aPoint x - left
 !
 
+vertices
+    "return the array containing my points as a closed polygon (for Polygon compatibility)"
+
+    ^ Array 
+        with:(self topLeft)
+        with:(self topRight)
+        with:(self bottomRight)
+        with:(self bottomLeft)
+        with:(self topLeft)
+
+    "
+     (Rectangle origin:100@100 extent:20@30) vertices            
+     (Rectangle origin:100@100 extent:20@30) asPolygon vertices  
+    "
+
+    "Modified: / 16-07-2010 / 16:59:16 / cg"
+!
+
 width
     "return the width of the rectangle"
 
@@ -1799,9 +1817,15 @@
 !Rectangle class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Rectangle.st 10517 2010-04-26 18:26:38Z vranyj1 $'
+    ^ '$Id: Rectangle.st 10549 2010-07-20 11:11:45Z vranyj1 $'
 !
 
 version_SVN
-    ^ '$Id: Rectangle.st 10517 2010-04-26 18:26:38Z vranyj1 $'
+    ^ '$Id: Rectangle.st 10549 2010-07-20 11:11:45Z vranyj1 $'
+   
+! 
+   
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.84 2010/07/16 14:59:40 cg Exp §'
 ! !
+