// resolution : 0.1\r
\r
// method\r
- function push(x, y){ // void\r
+ function push(x, y, off){ // void\r
var temp = new Object();\r
temp.x = Math.floor(x*10)/10;\r
temp.y = Math.floor(y*10)/10;\r
+ if(off != 1){\r
+ off = 0;\r
+ }\r
+ temp.off = off;\r
this.array.push(temp);\r
}\r
Polygon.prototype.push = push;\r
\r
- function set(index, x, y){ // void\r
+ function set(index, x, y, off){ // void\r
this.array[index].x = Math.floor(x*10)/10;\r
this.array[index].y = Math.floor(y*10)/10;\r
+ if(off != 1){\r
+ off = 0;\r
+ }\r
+ this.array[index].off = off;\r
}\r
Polygon.prototype.set = set;\r
\r
}\r
Polygon.prototype.shift = shift;\r
\r
- function unshift(x, y){ // void\r
+ function unshift(x, y, off){ // void\r
var temp = new Object();\r
temp.x = Math.floor(x*10)/10;\r
temp.y = Math.floor(y*10)/10;\r
+ if(off != 1){\r
+ off = 0;\r
+ }\r
+ temp.off = off;\r
this.array.unshift(temp);\r
}\r
Polygon.prototype.unshift = unshift;\r
// initialize\r
if(number){\r
for(var i = 0; i < number; i++){\r
- this.push(0, 0);\r
+ this.push(0, 0, 0);\r
}\r
}\r
\r