(1)Make fatten the bezier curve (2)Adjust box's Kakato (3)Update sample
authorKoichi KAMICHI <kamichi@fonts.jp>
Wed, 26 Aug 2009 04:40:45 +0000 (04:40 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Wed, 26 Aug 2009 04:40:45 +0000 (04:40 +0000)
scripts.

engine/kage.js
engine/kagecd.js
engine/sample.as
engine/sample.html

index 0fe9bdc..49343c7 100755 (executable)
@@ -121,6 +121,8 @@ function Kage(){
                                strokesArray[i][6] + this.kAdjustKakatoRangeY[k],\r
                                strokesArray[i][5] + this.kAdjustKakatoRangeX / 2,\r
                                strokesArray[i][6] + this.kAdjustKakatoRangeY[k + 1])\r
+             | strokesArray[i][6] + this.kAdjustKakatoRangeY[k + 1] > 200 // adjust for baseline\r
+             | strokesArray[i][6] - strokesArray[i][4] < this.kAdjustKakatoRangeY[k + 1] // for thin box\r
              ){\r
             strokesArray[i][2] += (3 - k) * 100;\r
             k = Infinity;\r
index c8e3fc6..012abd0 100755 (executable)
@@ -238,6 +238,7 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, a1, a2
         }\r
         else if(a1 == 7){\r
           deltad = Math.pow(t, hosomi);\r
+          deltad = Math.pow(deltad, 0.7); // make fatten\r
         }\r
         else if(a2 == 7){\r
           deltad = Math.pow(1.0 - t, hosomi);\r
index f88223c..d67ee06 100644 (file)
@@ -1,5 +1,6 @@
 #include "2d.js"\r
 #include "buhin.js"\r
+#include "curve.js"\r
 #include "kage.js"\r
 #include "kagecd.js"\r
 #include "kagedf.js"\r
@@ -7,6 +8,7 @@
 #include "polygons.js"\r
 \r
 var kage = new Kage();\r
+kage.kUseCurve = false;\r
 var polygons = new Polygons();\r
 \r
 kage.kBuhin.push("u6f22", "99:0:0:9:12:73:200:u6c35-07$99:0:0:54:10:190:199:u26c29-07");\r
index de9c06a..7c26c5e 100644 (file)
@@ -14,6 +14,7 @@ function draw() {
  var ctx = canvas.getContext("2d");\r
  \r
  var kage = new Kage();\r
+ kage.kUseCurve = false;\r
  var polygons = new Polygons();\r
  \r
  kage.kBuhin.push("u6f22", "99:0:0:9:12:73:200:u6c35-07$99:0:0:54:10:190:199:u26c29-07");\r