Point.st
changeset 379 5b5a130ccd09
parent 359 b8df66983eff
child 384 cc3d110ea879
--- a/Point.st	Thu Aug 10 14:14:29 1995 +0200
+++ b/Point.st	Thu Aug 10 14:32:31 1995 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Point.st,v 1.24 1995-06-27 02:13:55 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Point.st,v 1.25 1995-08-10 12:30:17 claus Exp $
 '!
 
 !Point class methodsFor:'documentation'!
@@ -44,7 +44,8 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Point.st,v 1.24 1995-06-27 02:13:55 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Point.st,v 1.25 1995-08-10 12:30:17 claus Exp $
+$Revision: 1.25 $
 "
 !
 
@@ -326,6 +327,18 @@
      for relative origin:
 	 (0.5@0.5) rectangleRelativeTo:(0@0 corner:100@100) preferred:(0@0 corner:50@50) 
     "
+!
+
+fromLiteralArrayEncoding:encoding
+    "read my values from an encoding.
+     The encoding is supposed to be of the form: (Point xValue yValue)"
+
+    x := encoding at:2.
+    y := encoding at:3.
+
+    "
+     Point new fromLiteralArrayEncoding:#(Point 10 20)
+    "
 ! !
 
 !Point methodsFor:'transformations'!