- case "text": return text;
- case "path": throw new JSExn("cannot read from the path property");
- case "fill": return Color.colorToString(fillcolor);
- case "strokecolor": return Color.colorToString(strokecolor);
- case "textcolor": return Color.colorToString(strokecolor);
+ case "text": return JS.S(text);
+ case "path": {
+ if (path != null) return JS.S(path.toString());
+ if (text == null) return null;
+ if (font == null) return null;
+ String ret = "";
+ for(int i=0; i<text.length(); i++) ret += font.glyphs[text.charAt(i)].path;
+ return JS.S(ret);
+ }
+ case "fill": return JS.S(Color.colorToString(fillcolor));
+ case "strokecolor": return JS.S(Color.colorToString(strokecolor));
+ case "textcolor": return JS.S(Color.colorToString(strokecolor));