}\r
}\r
else{ //bottom to up\r
- if(x1 == x2){ //is it right?\r
+ if(x1 == x2){\r
poly = new Polygon();\r
poly.push(x1 - kage.kMinWidthT, y1);\r
poly.push(x1 + kage.kMinWidthT, y1);\r
- poly.push(x1 - kage.kMinWidthT, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kage.kMinWidthT, y1 - kage.kMinWidthY);\r
polygons.push(poly);\r
}\r
else{\r
if(y1 <= y4){ //from up to bottom\r
if(x1 == x2){\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5);\r
- poly.push(x1 + kage.kMinWidthT + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2);\r
+ poly.push(x1 + kage.kMinWidthT, y1);\r
+ poly.push(x1 + kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
- y1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
+ poly.push(x1 + kage.kMinWidthT * XX,\r
+ y1 + kage.kMinWidthT * XY);\r
+ poly.push(x1 + kage.kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX,\r
+ y1 + kage.kMinWidthT * 1.5 * XY + kage.kMinWidthY * YY);\r
+ poly.push(x1 + kage.kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX,\r
+ y1 + kage.kMinWidthT * 0.5 * XY + kage.kMinWidthY * 3 * YY);\r
polygons.push(poly);\r
}\r
}\r
else{ //from bottom to up\r
- if(x1 == x2){ //is it right?\r
+ if(x1 == x2){\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, y1 - kage.kMinWidthY * 0.5);\r
- poly.push(x1 + kage.kMinWidthT + kage.kMinWidthT * 0.5, y1 - kage.kMinWidthY * 0.5 - kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 - kage.kMinWidthY * 0.5 - kage.kMinWidthY * 2);\r
+ poly.push(x1 - kage.kMinWidthT, y1);\r
+ poly.push(x1 - kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
+ poly.push(x1 - kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
polygons.push(poly);\r
}\r
- else{ //SETSUGOUMEN GA KAKERUNODE HOKYOU\r
+ else{\r
poly = new Polygon();\r
- poly.push(x1 - (kage.kMinWidthT - 1) * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 - (kage.kMinWidthT - 1) * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 0) * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 - (kage.kMinWidthT - 0) * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 - (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
- y1 - (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 0) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 - (kage.kMinWidthT - 0) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 1) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 - (kage.kMinWidthT - 1) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
+ poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
+ poly.push(x1 - kage.kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX, y1 + kage.kMinWidthY * YY - kage.kMinWidthT * 1.5 * XY);\r
+ poly.push(x1 - kage.kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX, y1 + kage.kMinWidthY * 3 * YY - kage.kMinWidthT * 0.5 * XY);\r
polygons.push(poly);\r
}\r
}\r
if(y1 <= y3){ //from up to bottom\r
if(x1 == x2){\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5);\r
- poly.push(x1 + kage.kMinWidthT + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 + kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2);\r
+ poly.push(x1 + kage.kMinWidthT, y1);\r
+ poly.push(x1 + kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
+ poly.push(x1 + kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
polygons.push(poly);\r
}\r
else{\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
- y1 + (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
- poly.push(x1 + kage.kMinWidthT * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 + kage.kMinWidthT * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
+ poly.push(x1 + kage.kMinWidthT * XX,\r
+ y1 + kage.kMinWidthT * XY);\r
+ poly.push(x1 + kage.kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX,\r
+ y1 + kage.kMinWidthT * 1.5 * XY + kage.kMinWidthY * YY);\r
+ poly.push(x1 + kage.kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX,\r
+ y1 + kage.kMinWidthT * 0.5 * XY + kage.kMinWidthY * 3 * YY);\r
polygons.push(poly);\r
}\r
}\r
else{ //from bottom to up\r
- if(x1 == x2){ //is it right?\r
+ if(x1 == x2){\r
poly = new Polygon();\r
- poly.push(x1 + kage.kMinWidthT, poly2[0].Y = y1 - kage.kMinWidthY * 0.5);\r
- poly.push(x1 + kage.kMinWidthT + kage.kMinWidthT * 0.5, y1 - kage.kMinWidthY * 0.5 - kage.kMinWidthY);\r
- poly.push(x1 + kage.kMinWidthT, y1 - kage.kMinWidthY * 0.5 - kage.kMinWidthY * 2);\r
+ poly.push(x1 - kage.kMinWidthT, y1);\r
+ poly.push(x1 - kage.kMinWidthT * 1.5, y1 + kage.kMinWidthY);\r
+ poly.push(x1 - kage.kMinWidthT * 0.5, y1 + kage.kMinWidthY * 3);\r
polygons.push(poly);\r
}\r
- else{ //SETSUGOUMEN GA KAKERUNODE HOKYOU\r
+ else{\r
poly = new Polygon();\r
- poly.push(x1 - (kage.kMinWidthT - 1) * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 - (kage.kMinWidthT - 1) * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 0) * XX + (kage.kMinWidthY * 0.5) * YX,\r
- y1 - (kage.kMinWidthT - 0) * XY + (kage.kMinWidthY * 0.5) * YY);\r
- poly.push(x1 - (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YX,\r
- y1 - (kage.kMinWidthT + kage.kMinWidthT * 0.5) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 0) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 - (kage.kMinWidthT - 0) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
- poly.push(x1 - (kage.kMinWidthT - 1) * XX + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YX,\r
- y1 - (kage.kMinWidthT - 1) * XY + (kage.kMinWidthY * 0.5 + kage.kMinWidthY * 2) * YY);\r
+ poly.push(x1 - kage.kMinWidthT * XX, y1 - kage.kMinWidthT * XY);\r
+ poly.push(x1 - kage.kMinWidthT * 1.5 * XX + kage.kMinWidthY * YX, y1 + kage.kMinWidthY * YY - kage.kMinWidthT * 1.5 * XY);\r
+ poly.push(x1 - kage.kMinWidthT * 0.5 * XX + kage.kMinWidthY * 3 * YX, y1 + kage.kMinWidthY * 3 * YY - kage.kMinWidthT * 0.5 * XY);\r
polygons.push(poly);\r
}\r
}\r