}\r
\r
if(a2 == 9 || (a1 == 7 && a2 == 0)){ // Math.sinnyu & L2RD Harai ... no need for a2=9\r
+ var type = (Math.atan2(Math.abs(y3 - y2), Math.abs(x3 - x2)) / Math.PI * 2 - 0.6);\r
+ if(type > 0){\r
+ type = type * 8;\r
+ } else {\r
+ type = type * 3;\r
+ }\r
+ var pm;\r
+ if(type < 0){\r
+ pm = -1;\r
+ } else {\r
+ pm = 1;\r
+ }\r
if(y2 == y3){\r
poly = new Polygon();\r
poly.push(x3, y3 + kage.kMinWidthT * kage.kL2RDfatten);\r
poly.push(x3, y3 - kage.kMinWidthT * kage.kL2RDfatten);\r
- poly.push(x3 + kage.kMinWidthT * kage.kL2RDfatten, y3 - kage.kMinWidthT * kage.kL2RDfatten);\r
+ poly.push(x3 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type), y3 + kage.kMinWidthT * kage.kL2RDfatten * pm);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
poly.push(x3 + kage.kMinWidthT * kage.kL2RDfatten * YX, y3 + kage.kMinWidthT * kage.kL2RDfatten * YY);\r
poly.push(x3 - kage.kMinWidthT * kage.kL2RDfatten * YX, y3 - kage.kMinWidthT * kage.kL2RDfatten * YY);\r
- poly.push(x3 + kage.kMinWidthT * kage.kL2RDfatten * XX - kage.kMinWidthT * kage.kL2RDfatten * YX,\r
- y3 + kage.kMinWidthT * kage.kL2RDfatten * XY - kage.kMinWidthT * kage.kL2RDfatten * YY);\r
+ poly.push(x3 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XX + kage.kMinWidthT * kage.kL2RDfatten * pm * YX,\r
+ y3 + kage.kMinWidthT * kage.kL2RDfatten * Math.abs(type) * XY + kage.kMinWidthT * kage.kL2RDfatten * pm * YY);\r
polygons.push(poly);\r
}\r
}\r