From 23285aefd2ed13a53c48a83fcbc372b5c7744f2a Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Wed, 26 Aug 2009 04:40:45 +0000 Subject: [PATCH] (1)Make fatten the bezier curve (2)Adjust box's Kakato (3)Update sample scripts. --- engine/kage.js | 2 ++ engine/kagecd.js | 1 + engine/sample.as | 2 ++ engine/sample.html | 1 + 4 files changed, 6 insertions(+) diff --git a/engine/kage.js b/engine/kage.js index 0fe9bdc..49343c7 100755 --- a/engine/kage.js +++ b/engine/kage.js @@ -121,6 +121,8 @@ function Kage(){ strokesArray[i][6] + this.kAdjustKakatoRangeY[k], strokesArray[i][5] + this.kAdjustKakatoRangeX / 2, strokesArray[i][6] + this.kAdjustKakatoRangeY[k + 1]) + | strokesArray[i][6] + this.kAdjustKakatoRangeY[k + 1] > 200 // adjust for baseline + | strokesArray[i][6] - strokesArray[i][4] < this.kAdjustKakatoRangeY[k + 1] // for thin box ){ strokesArray[i][2] += (3 - k) * 100; k = Infinity; diff --git a/engine/kagecd.js b/engine/kagecd.js index c8e3fc6..012abd0 100755 --- a/engine/kagecd.js +++ b/engine/kagecd.js @@ -238,6 +238,7 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, a1, a2 } else if(a1 == 7){ deltad = Math.pow(t, hosomi); + deltad = Math.pow(deltad, 0.7); // make fatten } else if(a2 == 7){ deltad = Math.pow(1.0 - t, hosomi); diff --git a/engine/sample.as b/engine/sample.as index f88223c..d67ee06 100644 --- a/engine/sample.as +++ b/engine/sample.as @@ -1,5 +1,6 @@ #include "2d.js" #include "buhin.js" +#include "curve.js" #include "kage.js" #include "kagecd.js" #include "kagedf.js" @@ -7,6 +8,7 @@ #include "polygons.js" var kage = new Kage(); +kage.kUseCurve = false; var polygons = new Polygons(); kage.kBuhin.push("u6f22", "99:0:0:9:12:73:200:u6c35-07$99:0:0:54:10:190:199:u26c29-07"); diff --git a/engine/sample.html b/engine/sample.html index de9c06a..7c26c5e 100644 --- a/engine/sample.html +++ b/engine/sample.html @@ -14,6 +14,7 @@ function draw() { var ctx = canvas.getContext("2d"); var kage = new Kage(); + kage.kUseCurve = false; var polygons = new Polygons(); kage.kBuhin.push("u6f22", "99:0:0:9:12:73:200:u6c35-07$99:0:0:54:10:190:199:u26c29-07"); -- 1.7.10.4