function Kage(){\r
- // method\r
- function drawFont(polygons, glyph){ // void\r
- // [glyph] : [stroke]$[stroke]$.....\r
- // [stroke] : [column]:[column]:.....\r
- var strokes = glyph.split("$");\r
- for(var i = 0; i < strokes.length; i++){\r
- var columns = strokes[i].split(":");\r
- if(Math.floor(columns[0] ! 99){\r
- dfDrawFont(this, polygons,\r
- Math.floor(columns[0]),\r
- Math.floor(columns[1]), Math.floor(columns[2]),\r
- Math.floor(columns[3]), Math.floor(columns[4]),\r
- Math.floor(columns[5]), Math.floor(columns[6]),\r
- Math.floor(columns[7]), Math.floor(columns[8]),\r
- Math.floor(columns[9]), Math.floor(columns[10]));\r
- } else {\r
- //buhin\r
- }\r
- }\r
+ // method\r
+ function drawFont(polygons, glyph){ // void\r
+ // [glyph] : [stroke]$[stroke]$.....\r
+ // [stroke] : [column]:[column]:.....\r
+ var strokes = glyph.split("$");\r
+ for(var i = 0; i < strokes.length; i++){\r
+ var columns = strokes[i].split(":");\r
+ if(Math.floor(columns[0]) != 99){\r
+ dfDrawFont(this, polygons,\r
+ Math.floor(columns[0]),\r
+ Math.floor(columns[1]), Math.floor(columns[2]),\r
+ Math.floor(columns[3]), Math.floor(columns[4]),\r
+ Math.floor(columns[5]), Math.floor(columns[6]),\r
+ Math.floor(columns[7]), Math.floor(columns[8]),\r
+ Math.floor(columns[9]), Math.floor(columns[10]));\r
+ } else {\r
+ var buhin = this.kBuhin.search(columns[7]);\r
+ if(buhin != ""){\r
+ this.drawBuhin(polygons, buhin,\r
+ Math.floor(columns[3]),\r
+ Math.floor(columns[4]),\r
+ Math.floor(columns[5]),\r
+ Math.floor(columns[6]));\r
+ }\r
+ }\r
+ }\r
+ }\r
+ Kage.prototype.drawFont = drawFont;\r
+ \r
+ function drawBuhin(polygons, glyph, x1, y1, x2, y2){\r
+ var strokes = glyph.split("$");\r
+ for(var i = 0; i < strokes.length; i++){\r
+ var columns = strokes[i].split(":");\r
+ if(Math.floor(columns[0]) != 99){\r
+ dfDrawFont(this, polygons,\r
+ Math.floor(columns[0]),\r
+ Math.floor(columns[1]),\r
+ Math.floor(columns[2]),\r
+ x1 + Math.floor(columns[3]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[4]) * (y2 - y1) / 200,\r
+ x1 + Math.floor(columns[5]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[6]) * (y2 - y1) / 200,\r
+ x1 + Math.floor(columns[7]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[8]) * (y2 - y1) / 200,\r
+ x1 + Math.floor(columns[9]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[10]) * (y2 - y1) / 200);\r
+ } else {\r
+ var buhin = this.kBuhin.search(columns[7]);\r
+ if(buhin != ""){\r
+ this.drawBuhin(polygons, buhin,\r
+ x1 + Math.floor(columns[3]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[4]) * (y2 - y1) / 200,\r
+ x1 + Math.floor(columns[5]) * (x2 - x1) / 200,\r
+ y1 + Math.floor(columns[6]) * (y2 - y1) / 200);\r
+ }\r
+ }\r
+ }\r
}\r
- Kage.prototype.drawFont = drawFont;\r
+ Kage.prototype.drawBuhin = drawBuhin;\r
\r
//properties\r
Kage.prototype.kMincho = 0;\r