From 0664e45e94fe989c8bfade5862f753727a06074f Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Tue, 21 Feb 2006 07:20:42 +0000 Subject: [PATCH] Added makeGlyph() and renamed a function. --- engine/kage.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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(":"); -- 1.7.10.4