licensing cleanup (GPLv2)
[org.ibex.core.git] / src / org / ibex / graphics / Path.java
index 71063a2..1e5c79f 100644 (file)
@@ -1,5 +1,8 @@
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the GNU General Public License version 2 ("the License").
+// You may not use this file except in compliance with the License.
+
 // FIXME
-// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.ibex.graphics;
 import java.util.*;
 
@@ -36,6 +39,13 @@ public class Path {
     static final byte TYPE_CUBIC = 3;
     static final byte TYPE_QUADRADIC = 4;
 
+    public static Path parse(String s) { return Tokenizer.parse(s); }
+
+    // FIXME: hack
+    private String toString;
+    private Path(String s) { this.toString = s; }
+    public String toString() { return toString; }
+
     public static class Tokenizer {
         // FIXME: check array bounds exception for improperly terminated string
         String s;
@@ -46,7 +56,7 @@ public class Path {
         public static Path parse(String s) {
             if (s == null) return null;
             Tokenizer t = new Tokenizer(s);
-            Path ret = new Path();
+            Path ret = new Path(s);
             char last_command = 'M';
             boolean first = true;
             while(t.hasMoreTokens()) {
@@ -534,6 +544,4 @@ public class Path {
             return ret;
         }
     }
-
-
 }