Supports new G/T left-bottom corner's shape.
[chise/kage.git] / kagecd.js
index 914cdbb..220df57 100644 (file)
--- a/kagecd.js
+++ b/kagecd.js
@@ -840,9 +840,13 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){
         poly.set(1, x2 + kMinWidthT, y2 + kage.kAdjustKakatoL[opt2]);\r
         break;\r
       case 23:\r
-        poly.set(2, x2 - kMinWidthT, y2 + kage.kAdjustKakatoR[opt2] + kMinWidthT);\r
+       poly.set(2, x2 - kMinWidthT, y2 + kage.kAdjustKakatoR[opt2] + kMinWidthT);\r
         poly.set(1, x2 + kMinWidthT, y2 + kage.kAdjustKakatoR[opt2]);\r
-        break;\r
+       break;\r
+      case 24: //for T/H design\r
+        poly.set(2, x2 - kMinWidthT, y2 + kage.kMinWidthY);\r
+        poly.set(1, x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
+       break;\r
       case 32:\r
         poly.set(2, x2 - kMinWidthT, y2 + kage.kMinWidthY);\r
         poly.set(1, x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
@@ -850,6 +854,24 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){
       }\r
       \r
       polygons.push(poly);\r
+\r
+      if(a2 == 24){ //for T design\r
+        poly = new Polygon();\r
+        poly.push(x2, y2 + kage.kMinWidthY);\r
+        poly.push(x2 + kMinWidthT, y2 - kage.kMinWidthY * 3);\r
+        poly.push(x2 + kMinWidthT * 2, y2 - kage.kMinWidthY);\r
+        poly.push(x2 + kMinWidthT * 2, y2 + kage.kMinWidthY);\r
+        polygons.push(poly);\r
+      }\r
+\r
+      if(a2 == 13 && opt2 == 4){ //for new GTH box's left bottom corner\r
+        poly = new Polygon();\r
+        poly.push(x2 - kMinWidthT, y2 - kage.kMinWidthY * 3);\r
+        poly.push(x2 - kMinWidthT * 2, y2);\r
+        poly.push(x2 - kage.kMinWidthY, y2 + kage.kMinWidthY * 5);\r
+        poly.push(x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
+        polygons.push(poly);\r
+      }\r
       \r
       if(a1 == 22){ //box's right top corner\r
         poly = new Polygon();\r
@@ -1114,7 +1136,17 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){
           poly.push(x1 - kMinWidthT, y1 + kMinWidthT + 4);\r
           polygons.push(poly);\r
         }\r
-        \r
+\r
+\r
+        if(a2 == 13 && opt2 == 4){ //for new GTH box's left bottom corner MUKI KANKEINASHI\r
+          poly = new Polygon();\r
+          poly.push(x2 - kMinWidthT, y2 - kage.kMinWidthY * 3);\r
+          poly.push(x2 - kMinWidthT * 2, y2);\r
+          poly.push(x2 - kage.kMinWidthY, y2 + kage.kMinWidthY * 5);\r
+          poly.push(x2 + kMinWidthT, y2 + kage.kMinWidthY);\r
+          polygons.push(poly);\r
+        }\r
+\r
         XX = Math.sin(rad) * v;\r
         XY = Math.cos(rad) * v * -1;\r
         YX = Math.cos(rad) * v;\r