From: Koichi KAMICHI Date: Fri, 4 Apr 2008 15:11:24 +0000 (+0000) Subject: Changed SVG format. Changed from int. to double of points. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1a5faedef04b210caa3e854b1516d94f85cffe4;p=chise%2Fkage.git Changed SVG format. Changed from int. to double of points. --- diff --git a/engine/polygon.js b/engine/polygon.js index c2e3907..e89ea72 100755 --- a/engine/polygon.js +++ b/engine/polygon.js @@ -1,16 +1,18 @@ function Polygon(number){ + // resolution : 0.1 + // method function push(x, y){ // void var temp = new Object(); - temp.x = Math.floor(x); - temp.y = Math.floor(y); + temp.x = Math.floor(x*10)/10; + temp.y = Math.floor(y*10)/10; this.array.push(temp); } Polygon.prototype.push = push; function set(index, x, y){ // void - this.array[index].x = Math.floor(x); - this.array[index].y = Math.floor(y); + this.array[index].x = Math.floor(x*10)/10; + this.array[index].y = Math.floor(y*10)/10; } Polygon.prototype.set = set; diff --git a/engine/polygons.js b/engine/polygons.js index 74e98dd..6e95331 100755 --- a/engine/polygons.js +++ b/engine/polygons.js @@ -40,8 +40,7 @@ function Polygons(){ function generateSVG(){ // string var buffer = ""; - buffer += "\n\n"; - buffer += "\n"; + buffer += "\n"; buffer += "\n"; for(var i = 0; i < this.array.length; i++){ buffer += "