Fixed a bug.(stroke type 2 - tail jump up)
authorKoichi KAMICHI <kamichi@fonts.jp>
Wed, 10 Nov 2010 04:44:11 +0000 (04:44 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Wed, 10 Nov 2010 04:44:11 +0000 (04:44 +0000)
engine/kagecd.js

index a7dedb5..6bb900e 100755 (executable)
@@ -583,10 +583,17 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t
     if(a2 == 15){ //jump up ... it can change 15->5\r
       // anytime same degree\r
       poly = new Polygon();\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
+      if(y1 < y2){\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
+      } else {\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
+      }\r
       polygons.push(poly);\r
     }\r
     \r