From: Koichi KAMICHI Date: Tue, 21 Feb 2006 07:20:42 +0000 (+0000) Subject: Added makeGlyph() and renamed a function. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0664e45e94fe989c8bfade5862f753727a06074f;p=chise%2Fkage.git Added makeGlyph() and renamed a function. --- diff --git a/engine/kage.js b/engine/kage.js index d91d102..16f2856 100755 --- a/engine/kage.js +++ b/engine/kage.js @@ -1,6 +1,14 @@ function Kage(){ // method - function drawFont(polygons, glyph){ // void + function makeGlyph(polygons, target){ // void + var buhin = this.kBuhin.search(target); + if(buhin != ""){ + this.drawGlyph(polygons, buhin); + } + } + Kage.prototype.makeGlyph = makeGlyph; + + function drawGlyph(polygons, glyph){ // void // [glyph] : [stroke]$[stroke]$..... // [stroke] : [column]:[column]:..... var strokes = glyph.split("$"); @@ -26,9 +34,9 @@ function Kage(){ } } } - Kage.prototype.drawFont = drawFont; + Kage.prototype.drawGlyph = drawGlyph; - function drawBuhin(polygons, glyph, x1, y1, x2, y2){ + function drawBuhin(polygons, glyph, x1, y1, x2, y2){ // void var strokes = glyph.split("$"); for(var i = 0; i < strokes.length; i++){ var columns = strokes[i].split(":");