poly.unshift(newx2, newy2);\r
}\r
\r
+ // suiheisen ni setsuzoku 2\r
+ if(a1 == 22){\r
+ var index = 0;\r
+ while(true){\r
+ if(poly2.array[index].y <= y1 && y1 <= poly2.array[index + 1].y){\r
+ break;\r
+ }\r
+ index++;\r
+ }\r
+ newx1 = poly2.array[index + 1].x + (poly2.array[index].x - poly2.array[index + 1].x) *\r
+ (poly2.array[index + 1].y - y1) / (poly2.array[index + 1].y - poly2.array[index].y);\r
+ newy1 = y1;\r
+ newx2 = poly.array[0].x + (poly.array[0].x - poly.array[1].x - 1) * (poly.array[0].y - y1) /\r
+ (poly.array[1].y - poly.array[0].y);\r
+ newy2 = y1 + 1;\r
+ \r
+ for(var i = 0; i < index; i++){\r
+ poly2.shift();\r
+ }\r
+ poly2.set(0, newx1, newy1);\r
+ poly.unshift(newx2, newy2);\r
+ }\r
+ \r
poly2.reverse();\r
poly.concat(poly2);\r
polygons.push(poly);\r
poly.unshift(newx2, newy2);\r
}\r
\r
+ // suiheisen ni setsuzoku 2\r
+ if(a1 == 22){\r
+ var index = 0;\r
+ while(true){\r
+ if(poly2.array[index].y <= y1 && y1 <= poly2.array[index + 1].y){\r
+ break;\r
+ }\r
+ index++;\r
+ }\r
+ newx1 = poly2.array[index + 1].x + (poly2.array[index].x - poly2.array[index + 1].x) *\r
+ (poly2.array[index + 1].y - y1) / (poly2.array[index + 1].y - poly2.array[index].y);\r
+ newy1 = y1;\r
+ newx2 = poly.array[0].x + (poly.array[0].x - poly.array[1].x - 1) * (poly.array[0].y - y1) /\r
+ (poly.array[1].y - poly.array[0].y);\r
+ newy2 = y1 + 1;\r
+ \r
+ for(var i = 0; i < index; i++){\r
+ poly2.shift();\r
+ }\r
+ poly2.set(0, newx1, newy1);\r
+ poly.unshift(newx2, newy2);\r
+ }\r
+ \r
poly2.reverse();\r
poly.concat(poly2);\r
polygons.push(poly);\r
poly.push(x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
poly.push(x1, y1 - kage.kMinWidthY - kage.kWidth);\r
poly.push(x1 + kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
- poly.push(x1 + kMinWidthT, y1 + kMinWidthT);\r
- poly.push(x1, y1 + kMinWidthT);\r
+ poly.push(x1 + kMinWidthT, y1 + kMinWidthT - 1);\r
+ poly.push(x1 - kMinWidthT, y1 + kMinWidthT + 4);\r
polygons.push(poly);\r
}\r
\r
break;\r
case 1:\r
case 6:\r
- case 22:\r
poly.set(0, x1 + Math.sin(rad) * kMinWidthT * v, y1 - Math.cos(rad) * kMinWidthT * v);\r
poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v, y1 + Math.cos(rad) * kMinWidthT * v);\r
break;\r
poly.set(3, x1 - Math.sin(rad) * kMinWidthT * v - (kMinWidthT + kage.kMinWidthY) * Math.cos(rad) * v,\r
y1 + Math.cos(rad) * kMinWidthT * v - (kMinWidthT + kage.kMinWidthY) * Math.sin(rad) * v);\r
break;\r
+ case 22:\r
+ poly.set(0, x1 + (kMinWidthT * v + 1) / Math.sin(rad), y1 + 1);\r
+ poly.set(3, x1 - (kMinWidthT * v) / Math.sin(rad), y1);\r
+ break;\r
case 32:\r
poly.set(0, x1 + (kMinWidthT * v) / Math.sin(rad), y1);\r
poly.set(3, x1 - (kMinWidthT * v) / Math.sin(rad), y1);\r
poly.push(x1 - kMinWidthT, y1 - kage.kMinWidthY);\r
poly.push(x1, y1 - kage.kMinWidthY - kage.kWidth);\r
poly.push(x1 + kMinWidthT + kage.kWidth, y1 + kage.kMinWidthY);\r
- poly.push(x1 + kMinWidthT, y1 + kMinWidthT);\r
- poly.push(x1 - kMinWidthT, y1);\r
+ poly.push(x1 + kMinWidthT, y1 + kMinWidthT - 1);\r
+ poly.push(x1 - kMinWidthT, y1 + kMinWidthT + 4);\r
polygons.push(poly);\r
}\r
\r