From 698071f54af9e004ef7b68b42b0f944dfe4b5d3b Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Wed, 10 Nov 2010 04:44:11 +0000 Subject: [PATCH] Fixed a bug.(stroke type 2 - tail jump up) --- engine/kagecd.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/engine/kagecd.js b/engine/kagecd.js index a7dedb5..6bb900e 100755 --- a/engine/kagecd.js +++ b/engine/kagecd.js @@ -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 // anytime same degree poly = new Polygon(); - poly.push(x2, y2 - kMinWidthT + 1); - poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5); - poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5); - poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1); + if(y1 < y2){ + poly.push(x2, y2 - kMinWidthT + 1); + poly.push(x2 + 2, y2 - kMinWidthT - kage.kWidth * 5); + poly.push(x2, y2 - kMinWidthT - kage.kWidth * 5); + poly.push(x2 - kMinWidthT, y2 - kMinWidthT + 1); + } else { + poly.push(x2, y2 + kMinWidthT - 1); + poly.push(x2 - 2, y2 + kMinWidthT + kage.kWidth * 5); + poly.push(x2, y2 + kMinWidthT + kage.kWidth * 5); + poly.push(x2 + kMinWidthT, y2 + kMinWidthT - 1); + } polygons.push(poly); } -- 1.7.10.4