// method\r
function push(x, y){ // void\r
var temp = new Object();\r
- temp.x = x;\r
- temp.y = y;\r
+ temp.x = Math.floor(x);\r
+ temp.y = Math.floor(y);\r
this.array.push(temp);\r
}\r
Polygon.prototype.push = push;\r
\r
function set(index, x, y){ // void\r
- this.array[index].x = x;\r
- this.array[index].y = y;\r
+ this.array[index].x = Math.floor(x);\r
+ this.array[index].y = Math.floor(y);\r
}\r
Polygon.prototype.set = set;\r
\r
function generateSVG(){ // string\r
var buffer = "";\r
buffer += "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\">\n";\r
- buffer += "<g stroke=\"black\" stroke-width=\"1\" fill=\"black\">\n";\r
+ buffer += "<g fill=\"black\">\n";\r
for(var i = 0; i < this.array.length; i++){\r
buffer += "<polyline points=\"";\r
for(var j = 0; j < this.array[i].array.length; j++){\r
buffer += this.array[i].array[j].x + "," + this.array[i].array[j].y + " ";\r
}\r
+ buffer += this.array[i].array[0].x + "," + this.array[i].array[0].y + " ";\r
buffer += "\" />\n";\r
}\r
buffer += "</g>\n";\r