Added sample script.
authorKoichi KAMICHI <kamichi@fonts.jp>
Thu, 2 Mar 2006 07:11:34 +0000 (07:11 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Thu, 2 Mar 2006 07:11:34 +0000 (07:11 +0000)
engine/test.js [new file with mode: 0644]

diff --git a/engine/test.js b/engine/test.js
new file mode 100644 (file)
index 0000000..a0c1372
--- /dev/null
@@ -0,0 +1,19 @@
+// KAGE engine sample for SpiderMonkey
+//
+// use like ... %js test.js > a.svg
+
+load("polygon.js");
+load("polygons.js");
+load("buhin.js");
+load("kage.js");
+load("kagecd.js");
+load("kagedf.js");
+
+kage = new Kage();
+polygons = new Polygons();
+
+kage.kBuhin.push("test", "2:7:8:66:2:95:16:110:33$1:0:2:28:56:102:56$1:22:4:103:56:103:196$1:0:2:3:92:66:92$2:22:7:66:92:48:146:1:178$2:0:7:186:66:163:89:125:112$2:7:0:107:60:130:144:196:182");
+
+kage.makeGlyph(polygons, "test");
+
+print(polygons.generateSVG());