From: Koichi KAMICHI Date: Sun, 30 Dec 2012 04:01:35 +0000 (+0900) Subject: set polygons to counter-clockwise X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec46619e1475dff28df1f6e63d603441908f379a;p=chise%2Fkage.git set polygons to counter-clockwise --- diff --git a/engine/kagecd.js b/engine/kagecd.js index 314db9d..a6e4bbf 100755 --- a/engine/kagecd.js +++ b/engine/kagecd.js @@ -400,9 +400,9 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t poly.push(x1 - kMinWidthT, y1 + 1); poly.push(x1 + kMinWidthT, y1); poly.push(x1 - kMinWidthT * pm, y1 - kage.kMinWidthY * type * pm); - if(x1 > x2){ - poly.reverse(); - } + //if(x1 > x2){ + // poly.reverse(); + //} polygons.push(poly); } else{ @@ -410,9 +410,9 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t poly.push(x1 - kMinWidthT * XX + 1 * YX, y1 - kMinWidthT * XY + 1 * YY); poly.push(x1 + kMinWidthT * XX, y1 + kMinWidthT * XY); poly.push(x1 - kMinWidthT * pm * XX - kage.kMinWidthY * type * pm * YX, y1 - kMinWidthT * pm * XY - kage.kMinWidthY * type * pm * YY); - if(x1 > x2){ - poly.reverse(); - } + //if(x1 > x2){ + // poly.reverse(); + //} polygons.push(poly); } } @@ -429,9 +429,9 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY); poly.push(x1 + kMinWidthT * XX, y1 + kMinWidthT * XY); poly.push(x1 + kMinWidthT * XX - kage.kMinWidthY * YX, y1 + kMinWidthT * XY - kage.kMinWidthY * YY); - if(x1 < x2){ - poly.reverse(); - } + //if(x1 < x2){ + // poly.reverse(); + //} polygons.push(poly); } } @@ -468,9 +468,9 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t y1 + kMinWidthT * 1.5 * XY + (kage.kMinWidthY - move * 1.2) * YY); poly.push(x1 + (kMinWidthT - 2) * XX + (kage.kMinWidthY * 2 - move * 0.8 + 1) * YX, y1 + (kMinWidthT - 2) * XY + (kage.kMinWidthY * 2 - move * 0.8 + 1) * YY); - if(x1 < x2){ - poly.reverse(); - } + //if(x1 < x2){ + // poly.reverse(); + //} polygons.push(poly); } } @@ -487,9 +487,9 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t poly.push(x1 - kMinWidthT * XX, y1 - kMinWidthT * XY); poly.push(x1 - kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX, y1 + kage.kMinWidthY * YY - kMinWidthT * 1.5 * XY); poly.push(x1 - kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX, y1 + kage.kMinWidthY * 3 * YY - kMinWidthT * 0.5 * XY); - if(x1 < x2){ - poly.reverse(); - } + //if(x1 < x2){ + // poly.reverse(); + //} polygons.push(poly); } } @@ -618,7 +618,7 @@ function cdDrawCurveU(kage, polygons, x1, y1, sx1, sy1, sx2, sy2, x2, y2, ta1, t poly.push(x2, y2 - kMinWidthT); poly.push(x2 - kage.kWidth * 4 * Math.pow(kMinWidthT / kage.kMinWidthT, 3), y2 - kMinWidthT); poly.push(x2 - kage.kWidth * 4 * Math.pow(kMinWidthT / kage.kMinWidthT, 3), y2 - kMinWidthT * 0.5); - poly.reverse(); + //poly.reverse(); polygons.push(poly); } } @@ -884,7 +884,7 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){ poly.push(x2 + kMinWidthT * 0.6, y2 + kMinWidthT * 0.6); poly.push(x2 + kMinWidthT, y2); } - poly.reverse(); // for fill-rule + //poly.reverse(); // for fill-rule polygons.push(poly); } } @@ -946,7 +946,7 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){ poly.push(x2, y2 - kMinWidthT - kage.kWidth * (4 * (1 - opt1 / kage.kAdjustMageStep) + 1)); poly.push(x2 + kMinWidthT, y2 - kMinWidthT + 1); } - poly.reverse(); // for fill-rule + //poly.reverse(); // for fill-rule polygons.push(poly); } } @@ -1162,7 +1162,7 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){ poly.push(x2 - kage.kWidth, y2); poly.push(x2 + kage.kWidth, y2); poly.push(x1 + kage.kWidth, y1); - poly.reverse(); // for fill-rule + //poly.reverse(); // for fill-rule polygons.push(poly); }