From: Koichi KAMICHI Date: Mon, 9 Aug 2010 09:28:40 +0000 (+0000) Subject: Supports slahssed TATE line. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95e8b6166004e66b9b2914e9b74bd859bdf4909e;p=chise%2Fkage.git Supports slahssed TATE line. --- diff --git a/engine/kagecd.js b/engine/kagecd.js index 263524e..2ee78b7 100755 --- a/engine/kagecd.js +++ b/engine/kagecd.js @@ -932,10 +932,8 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){ y1 + Math.cos(rad) * kMinWidthT * v - (kMinWidthT + kage.kMinWidthY) * Math.sin(rad) * v); break; case 32: - poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v, - y1 - Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v); - poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v - kage.kMinWidthY * Math.cos(rad) * v, - y1 + Math.cos(rad) * kMinWidthT * v - kage.kMinWidthY * Math.sin(rad) * v); + poly.set(0, x1 + (kMinWidthT * v) / Math.sin(rad), y1); + poly.set(3, x1 - (kMinWidthT * v) / Math.sin(rad), y1); break; } @@ -971,10 +969,8 @@ function cdDrawLine(kage, polygons, tx1, ty1, tx2, ty2, ta1, ta2){ y2 + Math.cos(rad) * kMinWidthT * v + (kage.kAdjustKakatoR[opt2] + kMinWidthT) * Math.sin(rad) * v); break; case 32: - poly.set(1, x2 + Math.sin(rad) * kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v, - y2 - Math.cos(rad) * kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v); - poly.set(2, x2 - Math.sin(rad) * kMinWidthT * v + kage.kMinWidthY * Math.cos(rad) * v, - y2 + Math.cos(rad) * kMinWidthT * v + kage.kMinWidthY * Math.sin(rad) * v); + poly.set(1, x2 + (kMinWidthT * v) / Math.sin(rad), y2); + poly.set(2, x2 - (kMinWidthT * v) / Math.sin(rad), y2); break; }