1 function Polygon(number){
\r
5 function push(x, y, off){ // void
\r
6 var temp = new Object();
\r
7 temp.x = Math.floor(x*10)/10;
\r
8 temp.y = Math.floor(y*10)/10;
\r
13 this.array.push(temp);
\r
15 Polygon.prototype.push = push;
\r
17 function set(index, x, y, off){ // void
\r
18 this.array[index].x = Math.floor(x*10)/10;
\r
19 this.array[index].y = Math.floor(y*10)/10;
\r
23 this.array[index].off = off;
\r
25 Polygon.prototype.set = set;
\r
27 function reverse(){ // void
\r
28 this.array.reverse();
\r
30 Polygon.prototype.reverse = reverse;
\r
32 function concat(poly){ // void
\r
33 this.array = this.array.concat(poly.array);
\r
35 Polygon.prototype.concat = concat;
\r
37 function shift(){ // void
\r
40 Polygon.prototype.shift = shift;
\r
42 function unshift(x, y, off){ // void
\r
43 var temp = new Object();
\r
44 temp.x = Math.floor(x*10)/10;
\r
45 temp.y = Math.floor(y*10)/10;
\r
50 this.array.unshift(temp);
\r
52 Polygon.prototype.unshift = unshift;
\r
55 this.array = new Array();
\r
59 for(var i = 0; i < number; i++){
\r