Added makeGlyph() and renamed a function.
authorKoichi KAMICHI <kamichi@fonts.jp>
Tue, 21 Feb 2006 07:20:42 +0000 (07:20 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Tue, 21 Feb 2006 07:20:42 +0000 (07:20 +0000)
engine/kage.js

index d91d102..16f2856 100755 (executable)
@@ -1,6 +1,14 @@
 function Kage(){\r
   // method\r
-  function drawFont(polygons, glyph){ // void\r
+  function makeGlyph(polygons, target){ // void\r
+    var buhin = this.kBuhin.search(target);\r
+    if(buhin != ""){\r
+      this.drawGlyph(polygons, buhin);\r
+    }\r
+  }\r
+  Kage.prototype.makeGlyph = makeGlyph;\r
+\r
+  function drawGlyph(polygons, glyph){ // void\r
     // [glyph] : [stroke]$[stroke]$.....\r
     // [stroke] : [column]:[column]:.....\r
     var strokes = glyph.split("$");\r
@@ -26,9 +34,9 @@ function Kage(){
       }\r
     }\r
   }\r
-  Kage.prototype.drawFont = drawFont;\r
+  Kage.prototype.drawGlyph = drawGlyph;\r
   \r
-  function drawBuhin(polygons, glyph, x1, y1, x2, y2){\r
+  function drawBuhin(polygons, glyph, x1, y1, x2, y2){ // void\r
     var strokes = glyph.split("$");\r
     for(var i = 0; i < strokes.length; i++){\r
       var columns = strokes[i].split(":");\r