-function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, a1, a2){\r
+function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, ta2){\r
var rad, t;\r
var x, y, v;\r
var ix, iy, ia, ib, ir;\r
var XX, XY, YX, YY;\r
var poly, poly2;\r
var hosomi;\r
+ var kMinWidthT, kMinWidthT2;\r
+ var a1, a2, opt1, opt2, opt3;\r
\r
if(kage.kShotai == kage.kMincho){ // mincho\r
+ a1 = ta1 % 100;\r
+ a2 = ta2 % 100;\r
+ opt1 = Math.floor((ta1 % 1000) / 100);\r
+ opt2 = Math.floor(ta2 / 100);\r
+ opt3 = Math.floor(ta1 / 1000);\r
+ \r
+ kMinWidthT = kage.kMinWidthT - opt1 / 2;\r
+ kMinWidthT2 = kage.kMinWidthT - opt3 / 2;\r
+ \r
switch(a1 % 100){\r
case 0:\r
case 7:\r
delta = 0;\r
break;\r
case 8: // get shorten for tail's circle\r
- delta = -1 * kage.kMinWidthT * 0.5;\r
+ delta = -1 * kMinWidthT * 0.5;\r
break;\r
default:\r
break;\r
// generating fatten curve -- begin\r
var kage2 = new Kage();\r
kage2.kMinWidthY = kage.kMinWidthY;\r
- kage2.kMinWidthT = kage.kMinWidthT;\r
+ kage2.kMinWidthT = kMinWidthT;\r
kage2.kWidth = kage.kWidth;\r
kage2.kKakato = kage.kKakato;\r
kage2.kRate = 10;\r
\r
var curve = new Array(2); // L and R\r
- get_candidate(kage2, curve, a1, a2, x1, y1, sx1, sy1, x2, y2);\r
+ get_candidate(kage2, curve, a1, a2, x1, y1, sx1, sy1, x2, y2, opt3);\r
\r
var dcl12_34 = new Array(2);\r
var dcr12_34 = new Array(2);\r
// line SUICHOKU by vector\r
if(ix != 0 && iy != 0){\r
ir = Math.atan(iy / ix * -1);\r
- ia = Math.sin(ir) * (kage.kMinWidthT);\r
- ib = Math.cos(ir) * (kage.kMinWidthT);\r
+ ia = Math.sin(ir) * (kMinWidthT);\r
+ ib = Math.cos(ir) * (kMinWidthT);\r
}\r
else if(ix == 0){\r
- ia = kage.kMinWidthT;\r
+ ia = kMinWidthT;\r
ib = 0;\r
}\r
else{\r
ia = 0;\r
- ib = kage.kMinWidthT;\r
+ ib = kMinWidthT;\r
}\r
\r
if(a1 == 7 && a2 == 0){ // L2RD: fatten\r
else if(a2 == 7){\r
deltad = Math.pow(1.0 - t, hosomi);\r
}\r
+ else if(opt3 > 0){\r
+ deltad = ((kage.kMinWidthT - opt3 / 2) / kage.kMinWidthT) + opt3 / 2 / kage.kMinWidthT * t;\r
+ }\r
else{ deltad = 1; }\r
\r
if(deltad < 0.15){\r
// line SUICHOKU by vector\r
if(ix != 0 && iy != 0){\r
ir = Math.atan(iy / ix * -1);\r
- ia = Math.sin(ir) * (kage.kMinWidthT);\r
- ib = Math.cos(ir) * (kage.kMinWidthT);\r
+ ia = Math.sin(ir) * (kMinWidthT);\r
+ ib = Math.cos(ir) * (kMinWidthT);\r
}\r
else if(ix == 0){\r
- ia = kage.kMinWidthT;\r
+ ia = kMinWidthT;\r
ib = 0;\r
}\r
else{\r
ia = 0;\r
- ib = kage.kMinWidthT;\r
+ ib = kMinWidthT;\r
}\r
\r
if(a1 == 7 && a2 == 0){ // L2RD: fatten\r
if(a1 == 12){\r
if(x1 == x2){\r
poly= new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
- poly.push(x1 + kage.kMinWidthT, y1);\r
- poly.push(x1 - kage.kMinWidthT, y1 - kage.kMinWidthT);\r
+ poly.push(x1 - kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT, y1);\r
+ poly.push(x1 - kMinWidthT, y1 - kMinWidthT);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
- poly.push(x1 + kage.kMinWidthT * XX, y1 + kage.kMinWidthT * XY);\r
- poly.push(x1 - kage.kMinWidthT * XX - kage.kMinWidthT * YX, y1 - kage.kMinWidthT * XY - kage.kMinWidthT * YY);\r
+ poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY);\r
+ poly.push(x1 + kMinWidthT * XX, y1 + kMinWidthT * XY);\r
+ poly.push(x1 - kMinWidthT * XX - kMinWidthT * YX, y1 - kMinWidthT * XY - kMinWidthT * YY);\r
polygons.push(poly);\r
}\r
}\r
}\r
if(x1 == sx1){\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
- poly.push(x1 + kage.kMinWidthT, y1);\r
- poly.push(x1 - kage.kMinWidthT * pm, y1 - kage.kMinWidthY * type * pm);\r
+ poly.push(x1 - kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT, y1);\r
+ poly.push(x1 - kMinWidthT * pm, y1 - kage.kMinWidthY * type * pm);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
- poly.push(x1 + kage.kMinWidthT * XX, y1 + kage.kMinWidthT * XY);\r
- poly.push(x1 - kage.kMinWidthT * pm * XX - kage.kMinWidthY * type * pm * YX, y1 - kage.kMinWidthT * pm * XY - kage.kMinWidthY * type * pm * YY);\r
+ poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY);\r
+ poly.push(x1 + kMinWidthT * XX, y1 + kMinWidthT * XY);\r
+ poly.push(x1 - kMinWidthT * pm * XX - kage.kMinWidthY * type * pm * YX, y1 - kMinWidthT * pm * XY - kage.kMinWidthY * type * pm * YY);\r
polygons.push(poly);\r
}\r
}\r
else{ //bottom to up\r
if(x1 == sx1){\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
- poly.push(x1 + kage.kMinWidthT, y1);\r
- poly.push(x1 + kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.push(x1 - kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT, y1 - kage.kMinWidthY);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
- poly.push(x1 + kage.kMinWidthT * XX, y1 + kage.kMinWidthT * XY);\r
- poly.push(x1 + kage.kMinWidthT * XX - kage.kMinWidthY * YX, y1 + kage.kMinWidthT * XY - kage.kMinWidthY * YY);\r
+ poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY);\r
+ poly.push(x1 + kMinWidthT * XX, y1 + kMinWidthT * XY);\r
+ poly.push(x1 + kMinWidthT * XX - kage.kMinWidthY * YX, y1 + kMinWidthT * XY - kage.kMinWidthY * YY);\r
polygons.push(poly);\r
}\r
}\r
\r
if(a1 == 22){ //box's up-right corner, any time same degree\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.push(x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
poly.push(x1, y1 - kage.kMinWidthY - kage.kWidth);\r
- poly.push(x1 + kage.kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthT);\r
- poly.push(x1, y1 + kage.kMinWidthT);\r
+ poly.push(x1 + kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kMinWidthT, y1 + kMinWidthT);\r
+ poly.push(x1, y1 + kMinWidthT);\r
polygons.push(poly);\r
}\r
\r
var move = kage.kMinWidthY * type * pm;\r
if(x1 == sx1){\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, y1 - move);\r
- poly.push(x1 + kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY - move);\r
- poly.push(x1 + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3 - move / 2);\r
+ poly.push(x1 + kMinWidthT, y1 - move);\r
+ poly.push(x1 + kMinWidthT * 1.5, y1 + kage.kMinWidthY - move);\r
+ poly.push(x1 + kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3 - move / 2);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT * XX - move * YX,\r
- y1 + kage.kMinWidthT * XY - move * YY);\r
- poly.push(x1 + kage.kMinWidthT * 1.5 * XX + (kage.kMinWidthY - move * 1.2) * YX,\r
- y1 + kage.kMinWidthT * 1.5 * XY + (kage.kMinWidthY - move * 1.2) * YY);\r
- poly.push(x1 + kage.kMinWidthT * 0.5 * XX + (kage.kMinWidthY * 3 - move * 0.8) * YX,\r
- y1 + kage.kMinWidthT * 0.5 * XY + (kage.kMinWidthY * 3 - move * 0.8) * YY);\r
+ poly.push(x1 + kMinWidthT * XX - move * YX,\r
+ y1 + kMinWidthT * XY - move * YY);\r
+ poly.push(x1 + kMinWidthT * 1.5 * XX + (kage.kMinWidthY - move * 1.2) * YX,\r
+ y1 + kMinWidthT * 1.5 * XY + (kage.kMinWidthY - move * 1.2) * YY);\r
+ poly.push(x1 + kMinWidthT * 0.5 * XX + (kage.kMinWidthY * 3 - move * 0.8) * YX,\r
+ y1 + kMinWidthT * 0.5 * XY + (kage.kMinWidthY * 3 - move * 0.8) * YY);\r
polygons.push(poly);\r
}\r
}\r
else{ //from bottom to up\r
if(x1 == sx1){\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
- poly.push(x1 - kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
- poly.push(x1 - kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
+ poly.push(x1 - kMinWidthT, y1);\r
+ poly.push(x1 - kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
+ poly.push(x1 - kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
- poly.push(x1 - kage.kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX, y1 + kage.kMinWidthY * YY - kage.kMinWidthT * 1.5 * XY);\r
- poly.push(x1 - kage.kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX, y1 + kage.kMinWidthY * 3 * YY - kage.kMinWidthT * 0.5 * XY);\r
+ poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY);\r
+ poly.push(x1 - kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX, y1 + kage.kMinWidthY * YY - kMinWidthT * 1.5 * XY);\r
+ poly.push(x1 - kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX, y1 + kage.kMinWidthY * 3 * YY - kMinWidthT * 0.5 * XY);\r
polygons.push(poly);\r
}\r
}\r
poly = new Polygon();\r
if(kage.kUseCurve){\r
// by curve path\r
- poly.push(x2 - kage.kMinWidthT, y2);\r
- poly.push(x2 - kage.kMinWidthT, y2 + kage.kMinWidthT, 1);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT, y2 + kage.kMinWidthT, 1);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2 + kMinWidthT, 1);\r
+ poly.push(x2, y2 + kMinWidthT);\r
+ poly.push(x2 + kMinWidthT, y2 + kMinWidthT, 1);\r
+ poly.push(x2 + kMinWidthT, y2);\r
} else {\r
// by polygon\r
- poly.push(x2 - kage.kMinWidthT, y2);\r
- poly.push(x2 - kage.kMinWidthT * 0.7, y2 + kage.kMinWidthT * 0.7);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT * 0.7, y2 + kage.kMinWidthT * 0.7);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT * 0.7, y2 + kMinWidthT * 0.7);\r
+ poly.push(x2, y2 + kMinWidthT);\r
+ poly.push(x2 + kMinWidthT * 0.7, y2 + kMinWidthT * 0.7);\r
+ poly.push(x2 + kMinWidthT, y2);\r
}\r
polygons.push(poly);\r
}\r
poly = new Polygon();\r
if(kage.kUseCurve){\r
// by curve path\r
- poly.push(x2 - kage.kMinWidthT, y2);\r
- poly.push(x2 - kage.kMinWidthT, y2 + kage.kMinWidthT, 1);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT, y2 + kage.kMinWidthT, 1);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2 + kMinWidthT, 1);\r
+ poly.push(x2, y2 + kMinWidthT);\r
+ poly.push(x2 + kMinWidthT, y2 + kMinWidthT, 1);\r
+ poly.push(x2 + kMinWidthT, y2);\r
} else {\r
// by polygon\r
- poly.push(x2, y2 - kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT * 0.7, y2 - kage.kMinWidthT * 0.7);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
- poly.push(x2 + kage.kMinWidthT * 0.7, y2 + kage.kMinWidthT * 0.7);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
+ poly.push(x2, y2 - kMinWidthT);\r
+ poly.push(x2 + kMinWidthT * 0.7, y2 - kMinWidthT * 0.7);\r
+ poly.push(x2 + kMinWidthT, y2);\r
+ poly.push(x2 + kMinWidthT * 0.7, y2 + kMinWidthT * 0.7);\r
+ poly.push(x2, y2 + kMinWidthT);\r
}\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
if(kage.kUseCurve){\r
- poly.push(x2 + Math.sin(rad) * kage.kMinWidthT * v, y2 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.9 * v + Math.sin(rad) * kage.kMinWidthT * 0.9 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.9 * v - Math.cos(rad) * kage.kMinWidthT * 0.9 * v, 1);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * v, y2 + Math.sin(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.9 * v - Math.sin(rad) * kage.kMinWidthT * 0.9 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.9 * v + Math.cos(rad) * kage.kMinWidthT * 0.9 * v, 1);\r
- poly.push(x2 - Math.sin(rad) * kage.kMinWidthT * v, y2 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.push(x2 + Math.sin(rad) * kMinWidthT * v, y2 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.9 * v + Math.sin(rad) * kMinWidthT * 0.9 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.9 * v - Math.cos(rad) * kMinWidthT * 0.9 * v, 1);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * v, y2 + Math.sin(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.9 * v - Math.sin(rad) * kMinWidthT * 0.9 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.9 * v + Math.cos(rad) * kMinWidthT * 0.9 * v, 1);\r
+ poly.push(x2 - Math.sin(rad) * kMinWidthT * v, y2 + Math.cos(rad) * kMinWidthT * v);\r
} else {\r
- poly.push(x2 + Math.sin(rad) * kage.kMinWidthT * v, y2 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.7 * v + Math.sin(rad) * kage.kMinWidthT * 0.7 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.7 * v - Math.cos(rad) * kage.kMinWidthT * 0.7 * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * v, y2 + Math.sin(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.7 * v - Math.sin(rad) * kage.kMinWidthT * 0.7 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.7 * v + Math.cos(rad) * kage.kMinWidthT * 0.7 * v);\r
- poly.push(x2 - Math.sin(rad) * kage.kMinWidthT * v, y2 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.push(x2 + Math.sin(rad) * kMinWidthT * v, y2 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.7 * v + Math.sin(rad) * kMinWidthT * 0.7 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.7 * v - Math.cos(rad) * kMinWidthT * 0.7 * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * v, y2 + Math.sin(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.7 * v - Math.sin(rad) * kMinWidthT * 0.7 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.7 * v + Math.cos(rad) * kMinWidthT * 0.7 * v);\r
+ poly.push(x2 - Math.sin(rad) * kMinWidthT * v, y2 + Math.cos(rad) * kMinWidthT * v);\r
}\r
polygons.push(poly);\r
}\r
}\r
if(sy2 == y2){\r
poly = new Polygon();\r
- poly.push(x2, y2 + kage.kMinWidthT * kage.kL2RDfatten);\r
- poly.push(x2, y2 - kage.kMinWidthT * kage.kL2RDfatten);\r
- poly.push(x2 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type), y2 + kage.kMinWidthT * kage.kL2RDfatten * pm);\r
+ poly.push(x2, y2 + kMinWidthT * kage.kL2RDfatten);\r
+ poly.push(x2, y2 - kMinWidthT * kage.kL2RDfatten);\r
+ poly.push(x2 + kMinWidthT * kage.kL2RDfatten * Math.abs(type), y2 + kMinWidthT * kage.kL2RDfatten * pm);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x2 + kage.kMinWidthT * kage.kL2RDfatten * YX, y2 + kage.kMinWidthT * kage.kL2RDfatten * YY);\r
- poly.push(x2 - kage.kMinWidthT * kage.kL2RDfatten * YX, y2 - kage.kMinWidthT * kage.kL2RDfatten * YY);\r
- poly.push(x2 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XX + kage.kMinWidthT * kage.kL2RDfatten * pm * YX,\r
- y2 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XY + kage.kMinWidthT * kage.kL2RDfatten * pm * YY);\r
+ poly.push(x2 + kMinWidthT * kage.kL2RDfatten * YX, y2 + kMinWidthT * kage.kL2RDfatten * YY);\r
+ poly.push(x2 - kMinWidthT * kage.kL2RDfatten * YX, y2 - kMinWidthT * kage.kL2RDfatten * YY);\r
+ poly.push(x2 + kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XX + kMinWidthT * kage.kL2RDfatten * pm * YX,\r
+ y2 + kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XY + kMinWidthT * kage.kL2RDfatten * pm * YY);\r
polygons.push(poly);\r
}\r
}\r
if(a2 == 15){ //jump up ... it can change 15->5\r
if(sy2 == y2){\r
poly = new Polygon();\r
- poly.push(x2, y2 - kage.kMinWidthT + 1);\r
- poly.push(x2 + 2, y2 - kage.kMinWidthT - kage.kWidth * 5);\r
- poly.push(x2, y2 - kage.kMinWidthT - kage.kWidth * 5);\r
- poly.push(x2 - kage.kMinWidthT, y2 - kage.kMinWidthT + 1);\r
+ poly.push(x2, y2 - kMinWidthT + 1);\r
+ poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5);\r
+ poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5);\r
+ poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x2 + (kage.kMinWidthT - 1) * Math.sin(rad) * v, y2 - (kage.kMinWidthT - 1) * Math.cos(rad) * v);\r
- poly.push(x2 + 2 * Math.cos(rad) * v + (kage.kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
- y2 + 2 * Math.sin(rad) * v - (kage.kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
- poly.push(x2 + (kage.kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
- y2 - (kage.kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
- poly.push(x2 + (kage.kMinWidthT - 1) * Math.sin(rad) * v - kage.kMinWidthT * Math.cos(rad) * v,\r
- y2 - (kage.kMinWidthT - 1) * Math.cos(rad) * v - kage.kMinWidthT * Math.sin(rad) * v);\r
+ poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v, y2 - (kMinWidthT - 1) * Math.cos(rad) * v);\r
+ poly.push(x2 + 2 * Math.cos(rad) * v + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
+ y2 + 2 * Math.sin(rad) * v - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
+ poly.push(x2 + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
+ y2 - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
+ poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v - kMinWidthT * Math.cos(rad) * v,\r
+ y2 - (kMinWidthT - 1) * Math.cos(rad) * v - kMinWidthT * Math.sin(rad) * v);\r
polygons.push(poly);\r
}\r
}\r
\r
- if(a2 == 14){ //jump to left, allways go left ... it can change 14->4\r
+ if(a2 == 14){ //jump to left, allways go left\r
poly = new Polygon();\r
poly.push(x2, y2);\r
- poly.push(x2, y2 - kage.kMinWidthT);\r
- poly.push(x2 - kage.kWidth * 4, y2 - kage.kMinWidthT);\r
- poly.push(x2 - kage.kWidth * 4, y2 - kage.kMinWidthT * 0.5);\r
+ poly.push(x2, y2 - kMinWidthT);\r
+ poly.push(x2 - kage.kWidth * 4 * Math.pow(kMinWidthT / kage.kMinWidthT, 3), y2 - kMinWidthT);\r
+ poly.push(x2 - kage.kWidth * 4 * Math.pow(kMinWidthT / kage.kMinWidthT, 3), y2 - kMinWidthT * 0.5);\r
polygons.push(poly);\r
}\r
}\r
var a1, a2, opt1, opt2;\r
var XX, XY, YX, YY;\r
var poly;\r
+ var kMinWidthT;\r
\r
if(kage.kShotai == kage.kMincho){ //mincho\r
x1 = tx1;\r
opt1 = Math.floor(ta1 / 100);\r
opt2 = Math.floor(ta2 / 100);\r
\r
+ kMinWidthT = kage.kMinWidthT - opt1 / 2;\r
+ \r
if(x1 == x2){ //if TATE stroke, use y-axis\r
poly = new Polygon(4);\r
switch(a1){\r
case 0:\r
- poly.set(3, x1 - kage.kMinWidthT, y1 - kage.kMinWidthY / 2);\r
- poly.set(0, x1 + kage.kMinWidthT, y1 + kage.kMinWidthY / 2);\r
+ poly.set(3, x1 - kMinWidthT, y1 - kage.kMinWidthY / 2);\r
+ poly.set(0, x1 + kMinWidthT, y1 + kage.kMinWidthY / 2);\r
break;\r
case 1:\r
case 6: //... no need\r
case 22:\r
- poly.set(3, x1 - kage.kMinWidthT, y1);\r
- poly.set(0, x1 + kage.kMinWidthT, y1);\r
+ poly.set(3, x1 - kMinWidthT, y1);\r
+ poly.set(0, x1 + kMinWidthT, y1);\r
break;\r
case 12:\r
- poly.set(3, x1 - kage.kMinWidthT, y1 - kage.kMinWidthY - kage.kMinWidthT);\r
- poly.set(0, x1 + kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.set(3, x1 - kMinWidthT, y1 - kage.kMinWidthY - kMinWidthT);\r
+ poly.set(0, x1 + kMinWidthT, y1 - kage.kMinWidthY);\r
break;\r
case 32:\r
- poly.set(3, x1 - kage.kMinWidthT, y1 - kage.kMinWidthY);\r
- poly.set(0, x1 + kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.set(3, x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.set(0, x1 + kMinWidthT, y1 - kage.kMinWidthY);\r
break;\r
}\r
\r
switch(a2){\r
case 0:\r
if(a1 == 6){ //KAGI's tail ... no need\r
- poly.set(2, x2 - kage.kMinWidthT, y2);\r
- poly.set(1, x2 + kage.kMinWidthT, y2);\r
+ poly.set(2, x2 - kMinWidthT, y2);\r
+ poly.set(1, x2 + kMinWidthT, y2);\r
}\r
else{\r
- poly.set(2, x2 - kage.kMinWidthT, y2 + kage.kMinWidthT / 2);\r
- poly.set(1, x2 + kage.kMinWidthT, y2 - kage.kMinWidthT / 2);\r
+ poly.set(2, x2 - kMinWidthT, y2 + kMinWidthT / 2);\r
+ poly.set(1, x2 + kMinWidthT, y2 - kMinWidthT / 2);\r
}\r
break;\r
case 1:\r
- poly.set(2, x2 - kage.kMinWidthT, y2);\r
- poly.set(1, x2 + kage.kMinWidthT, y2);\r
+ poly.set(2, x2 - kMinWidthT, y2);\r
+ poly.set(1, x2 + kMinWidthT, y2);\r
break;\r
case 13:\r
- poly.set(2, x2 - kage.kMinWidthT, y2 + kage.kAdjustKakatoL[opt2] + kage.kMinWidthT);\r
- poly.set(1, x2 + kage.kMinWidthT, y2 + kage.kAdjustKakatoL[opt2]);\r
+ poly.set(2, x2 - kMinWidthT, y2 + kage.kAdjustKakatoL[opt2] + kMinWidthT);\r
+ poly.set(1, x2 + kMinWidthT, y2 + kage.kAdjustKakatoL[opt2]);\r
break;\r
case 23:\r
- poly.set(2, x2 - kage.kMinWidthT, y2 + kage.kAdjustKakatoR[opt2] + kage.kMinWidthT);\r
- poly.set(1, x2 + kage.kMinWidthT, y2 + kage.kAdjustKakatoR[opt2]);\r
+ poly.set(2, x2 - kMinWidthT, y2 + kage.kAdjustKakatoR[opt2] + kMinWidthT);\r
+ poly.set(1, x2 + kMinWidthT, y2 + kage.kAdjustKakatoR[opt2]);\r
break;\r
case 32:\r
- poly.set(2, x2 - kage.kMinWidthT, y2 + kage.kMinWidthY);\r
- poly.set(1, x2 + kage.kMinWidthT, y2 + kage.kMinWidthY);\r
+ poly.set(2, x2 - kMinWidthT, y2 + kage.kMinWidthY);\r
+ poly.set(1, x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
break;\r
}\r
\r
\r
if(a1 == 22){ //box's right top corner\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.push(x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
poly.push(x1, y1 - kage.kMinWidthY - kage.kWidth);\r
- poly.push(x1 + kage.kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthT);\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kMinWidthT, y1 + kMinWidthT);\r
+ poly.push(x1 - kMinWidthT, y1);\r
polygons.push(poly);\r
}\r
\r
if(a1 == 0){ //beginning of the stroke\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5);\r
- poly.push(x1 + kage.kMinWidthT + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2);\r
+ poly.push(x1 + kMinWidthT, y1 + kage.kMinWidthY * 0.5);\r
+ poly.push(x1 + kMinWidthT + kMinWidthT * 0.5, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY);\r
+ poly.push(x1 + kMinWidthT, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2);\r
polygons.push(poly);\r
}\r
\r
if((a1 == 6 && a2 == 0) || a2 == 1){ //KAGI NO YOKO BOU NO SAIGO NO MARU ... no need only used at 1st=yoko\r
poly = new Polygon();\r
- poly.push(x2 - kage.kMinWidthT, y2);\r
- poly.push(x2 - kage.kMinWidthT * 0.6, y2 + kage.kMinWidthT * 0.6);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT * 0.6, y2 + kage.kMinWidthT * 0.6);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT, y2);\r
+ poly.push(x2 - kMinWidthT * 0.6, y2 + kMinWidthT * 0.6);\r
+ poly.push(x2, y2 + kMinWidthT);\r
+ poly.push(x2 + kMinWidthT * 0.6, y2 + kMinWidthT * 0.6);\r
+ poly.push(x2 + kMinWidthT, y2);\r
poly.reverse(); // for fill-rule\r
polygons.push(poly);\r
}\r
else if(y1 == y2){ //if it is YOKO stroke, use x-axis\r
if(a1 == 6){ //if it is KAGI's YOKO stroke, get bold\r
poly = new Polygon();\r
- poly.push(x1, y1 - kage.kMinWidthT);\r
- poly.push(x2, y2 - kage.kMinWidthT);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
- poly.push(x1, y1 + kage.kMinWidthT);\r
+ poly.push(x1, y1 - kMinWidthT);\r
+ poly.push(x2, y2 - kMinWidthT);\r
+ poly.push(x2, y2 + kMinWidthT);\r
+ poly.push(x1, y1 + kMinWidthT);\r
polygons.push(poly);\r
\r
if(a2 == 1 || a2 == 0 || a2 == 5){ // no need a2=1\r
//KAGI NO YOKO BOU NO SAIGO NO MARU\r
poly = new Polygon();\r
- poly.push(x2, y2 - kage.kMinWidthT);\r
- poly.push(x2 + kage.kMinWidthT * 0.6, y2 - kage.kMinWidthT * 0.6);\r
- poly.push(x2 + kage.kMinWidthT, y2);\r
- poly.push(x2 + kage.kMinWidthT * 0.6, y2 + kage.kMinWidthT * 0.6);\r
- poly.push(x2, y2 + kage.kMinWidthT);\r
+ poly.push(x2, y2 - kMinWidthT);\r
+ poly.push(x2 + kMinWidthT * 0.6, y2 - kMinWidthT * 0.6);\r
+ poly.push(x2 + kMinWidthT, y2);\r
+ poly.push(x2 + kMinWidthT * 0.6, y2 + kMinWidthT * 0.6);\r
+ poly.push(x2, y2 + kMinWidthT);\r
polygons.push(poly);\r
}\r
\r
if(a2 == 5){\r
//KAGI NO YOKO BOU NO HANE\r
poly = new Polygon();\r
- poly.push(x2, y2 - kage.kMinWidthT + 1);\r
- poly.push(x2 + 2, y2 - kage.kMinWidthT - kage.kWidth * 5);\r
- poly.push(x2, y2 - kage.kMinWidthT - kage.kWidth * 5);\r
- poly.push(x2 - kage.kMinWidthT, y2 - kage.kMinWidthT + 1);\r
+ poly.push(x2, y2 - kMinWidthT + 1);\r
+ poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5);\r
+ poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5);\r
+ poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1);\r
poly.reverse(); // for fill-rule\r
polygons.push(poly);\r
}\r
poly = new Polygon(4);\r
switch(a1){\r
case 0:\r
- poly.set(0, x1 + Math.sin(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * 0.5 * v,\r
- y1 - Math.cos(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * 0.5 * v);\r
- poly.set(3, x1 - Math.sin(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * 0.5 * v,\r
- y1 + Math.cos(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * 0.5 * v);\r
+ poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * 0.5 * v,\r
+ y1 - Math.cos(rad) * kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * 0.5 * v);\r
+ poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * 0.5 * v,\r
+ y1 + Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * 0.5 * v);\r
break;\r
case 1:\r
case 6:\r
case 22:\r
- poly.set(0, x1 + Math.sin(rad) * kage.kMinWidthT * v, y1 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.set(3, x1 - Math.sin(rad) * kage.kMinWidthT * v, y1 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v, y1 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v, y1 + Math.cos(rad) * kMinWidthT * v);\r
break;\r
case 12:\r
- poly.set(0, x1 + Math.sin(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
- y1 - Math.cos(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
- poly.set(3, x1 - Math.sin(rad) * kage.kMinWidthT * v - (kage.kMinWidthT + kage.kMinWidthY) * Math.cos(rad) * v,\r
- y1 + Math.cos(rad) * kage.kMinWidthT * v - (kage.kMinWidthT + kage.kMinWidthY) * Math.sin(rad) * v);\r
+ poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
+ y1 - Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
+ poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v - (kMinWidthT + kage.kMinWidthY) * Math.cos(rad) * v,\r
+ y1 + Math.cos(rad) * kMinWidthT * v - (kMinWidthT + kage.kMinWidthY) * Math.sin(rad) * v);\r
break;\r
case 32:\r
- poly.set(0, x1 + Math.sin(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
- y1 - Math.cos(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
- poly.set(3, x1 - Math.sin(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
- y1 + Math.cos(rad) * kage.kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
+ poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
+ y1 - Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
+ poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v,\r
+ y1 + Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v);\r
break;\r
}\r
\r
switch(a2){\r
case 0:\r
if(a1 == 6){\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v, y2 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.set(2, x2 - Math.sin(rad) * kage.kMinWidthT * v, y2 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v, y2 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v, y2 + Math.cos(rad) * kMinWidthT * v);\r
}\r
else{\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v - kage.kMinWidthT * 0.5 * Math.cos(rad) * v,\r
- y2 - Math.cos(rad) * kage.kMinWidthT * v - kage.kMinWidthT * 0.5 * Math.sin(rad) * v);\r
- poly.set(2, x2 - Math.sin(rad) * kage.kMinWidthT * v + kage.kMinWidthT * 0.5 * Math.cos(rad) * v,\r
- y2 + Math.cos(rad) * kage.kMinWidthT * v + kage.kMinWidthT * 0.5 * Math.sin(rad) * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v - kMinWidthT * 0.5 * Math.cos(rad) * v,\r
+ y2 - Math.cos(rad) * kMinWidthT * v - kMinWidthT * 0.5 * Math.sin(rad) * v);\r
+ poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v + kMinWidthT * 0.5 * Math.cos(rad) * v,\r
+ y2 + Math.cos(rad) * kMinWidthT * v + kMinWidthT * 0.5 * Math.sin(rad) * v);\r
}\r
break;\r
case 1: // is needed?\r
case 5:\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v, y2 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.set(2, x2 - Math.sin(rad) * kage.kMinWidthT * v, y2 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v, y2 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v, y2 + Math.cos(rad) * kMinWidthT * v);\r
break;\r
case 13:\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v + kage.kAdjustKakatoL[opt2] * Math.cos(rad) * v,\r
- y2 - Math.cos(rad) * kage.kMinWidthT * v + kage.kAdjustKakatoL[opt2] * Math.sin(rad) * v);\r
- poly.set(2, x2 - Math.sin(rad) * kage.kMinWidthT * v + (kage.kAdjustKakatoL[opt2] + kage.kMinWidthT) * Math.cos(rad) * v,\r
- y2 + Math.cos(rad) * kage.kMinWidthT * v + (kage.kAdjustKakatoL[opt2] + kage.kMinWidthT) * Math.sin(rad) * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v + kage.kAdjustKakatoL[opt2] * Math.cos(rad) * v,\r
+ y2 - Math.cos(rad) * kMinWidthT * v + kage.kAdjustKakatoL[opt2] * Math.sin(rad) * v);\r
+ poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v + (kage.kAdjustKakatoL[opt2] + kMinWidthT) * Math.cos(rad) * v,\r
+ y2 + Math.cos(rad) * kMinWidthT * v + (kage.kAdjustKakatoL[opt2] + kMinWidthT) * Math.sin(rad) * v);\r
break;\r
case 23:\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v + kage.kAdjustKakatoR[opt2] * Math.cos(rad) * v,\r
- y2 - Math.cos(rad) * kage.kMinWidthT * v + kage.kAdjustKakatoR[opt2] * Math.sin(rad) * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v + kage.kAdjustKakatoR[opt2] * Math.cos(rad) * v,\r
+ y2 - Math.cos(rad) * kMinWidthT * v + kage.kAdjustKakatoR[opt2] * Math.sin(rad) * v);\r
poly.set(2,\r
- x2 - Math.sin(rad) * kage.kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kage.kMinWidthT) * Math.cos(rad) * v,\r
- y2 + Math.cos(rad) * kage.kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kage.kMinWidthT) * Math.sin(rad) * v);\r
+ x2 - Math.sin(rad) * kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kMinWidthT) * Math.cos(rad) * v,\r
+ y2 + Math.cos(rad) * kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kMinWidthT) * Math.sin(rad) * v);\r
break;\r
case 32:\r
- poly.set(1, x2 + Math.sin(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v,\r
- y2 - Math.cos(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v);\r
- poly.set(2, x2 - Math.sin(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v,\r
- y2 + Math.cos(rad) * kage.kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v);\r
+ poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v,\r
+ y2 - Math.cos(rad) * kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v);\r
+ poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v,\r
+ y2 + Math.cos(rad) * kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v);\r
break;\r
}\r
\r
\r
if((a1 == 6) && (a2 == 0 || a2 == 5)){ //KAGI NO YOKO BOU NO SAIGO NO MARU\r
poly = new Polygon();\r
- poly.push(x2 + Math.sin(rad) * kage.kMinWidthT * v, y2 - Math.cos(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.8 * v + Math.sin(rad) * kage.kMinWidthT * 0.6 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.8 * v - Math.cos(rad) * kage.kMinWidthT * 0.6 * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * v, y2 + Math.sin(rad) * kage.kMinWidthT * v);\r
- poly.push(x2 + Math.cos(rad) * kage.kMinWidthT * 0.8 * v - Math.sin(rad) * kage.kMinWidthT * 0.6 * v,\r
- y2 + Math.sin(rad) * kage.kMinWidthT * 0.8 * v + Math.cos(rad) * kage.kMinWidthT * 0.6 * v);\r
- poly.push(x2 - Math.sin(rad) * kage.kMinWidthT * v, y2 + Math.cos(rad) * kage.kMinWidthT * v);\r
+ poly.push(x2 + Math.sin(rad) * kMinWidthT * v, y2 - Math.cos(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.8 * v + Math.sin(rad) * kMinWidthT * 0.6 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.8 * v - Math.cos(rad) * kMinWidthT * 0.6 * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * v, y2 + Math.sin(rad) * kMinWidthT * v);\r
+ poly.push(x2 + Math.cos(rad) * kMinWidthT * 0.8 * v - Math.sin(rad) * kMinWidthT * 0.6 * v,\r
+ y2 + Math.sin(rad) * kMinWidthT * 0.8 * v + Math.cos(rad) * kMinWidthT * 0.6 * v);\r
+ poly.push(x2 - Math.sin(rad) * kMinWidthT * v, y2 + Math.cos(rad) * kMinWidthT * v);\r
polygons.push(poly);\r
}\r
\r
if(a1 == 6 && a2 == 5){\r
//KAGI NO YOKO BOU NO HANE\r
poly = new Polygon();\r
- poly.push(x2 + (kage.kMinWidthT - 1) * Math.sin(rad) * v, y2 - (kage.kMinWidthT - 1) * Math.cos(rad) * v);\r
- poly.push(x2 + 2 * Math.cos(rad) * v + (kage.kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
- y2 + 2 * Math.sin(rad) * v - (kage.kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
- poly.push(x2 + (kage.kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
- y2 - (kage.kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
- poly.push(x2 + (kage.kMinWidthT - 1) * Math.sin(rad) * v - kage.kMinWidthT * Math.cos(rad) * v,\r
- y2 - (kage.kMinWidthT - 1) * Math.cos(rad) * v - kage.kMinWidthT * Math.sin(rad) * v);\r
+ poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v, y2 - (kMinWidthT - 1) * Math.cos(rad) * v);\r
+ poly.push(x2 + 2 * Math.cos(rad) * v + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
+ y2 + 2 * Math.sin(rad) * v - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
+ poly.push(x2 + (kMinWidthT + kage.kWidth * 5) * Math.sin(rad) * v,\r
+ y2 - (kMinWidthT + kage.kWidth * 5) * Math.cos(rad) * v);\r
+ poly.push(x2 + (kMinWidthT - 1) * Math.sin(rad) * v - kMinWidthT * Math.cos(rad) * v,\r
+ y2 - (kMinWidthT - 1) * Math.cos(rad) * v - kMinWidthT * Math.sin(rad) * v);\r
polygons.push(poly);\r
}\r
\r
if(a1 == 22){ //SHIKAKU MIGIUE UROKO NANAME DEMO MASSUGU MUKI\r
poly = new Polygon();\r
- poly.push(x1 - kage.kMinWidthT, y1 - kage.kMinWidthY);\r
+ poly.push(x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
poly.push(x1, y1 - kage.kMinWidthY - kage.kWidth);\r
- poly.push(x1 + kage.kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthT);\r
- poly.push(x1 - kage.kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kMinWidthT, y1 + kMinWidthT);\r
+ poly.push(x1 - kMinWidthT, y1);\r
polygons.push(poly);\r
}\r
\r
\r
if(a1 == 0){ //beginning of the storke\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
- y1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
+ poly.push(x1 + kMinWidthT * XX + (kage.kMinWidthY * 0.5) * YX,\r
+ y1 + kMinWidthT * XY + (kage.kMinWidthY * 0.5) * YY);\r
+ poly.push(x1 + (kMinWidthT + kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
+ y1 + (kMinWidthT + kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
+ poly.push(x1 + kMinWidthT * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
+ y1 + kMinWidthT * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
polygons.push(poly);\r
}\r
}\r