From: Koichi KAMICHI Date: Tue, 3 Mar 2009 14:35:18 +0000 (+0000) Subject: Fixed function of generating EPS file. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00906ef75e946fed811afc67b8b92c5a1aceae03;p=chise%2Fkage.git Fixed function of generating EPS file. --- diff --git a/engine/polygons.js b/engine/polygons.js index a52305c..74f2907 100755 --- a/engine/polygons.js +++ b/engine/polygons.js @@ -74,20 +74,18 @@ function Polygons(){ buffer += "%%CreationDate: " + new Date() + "\n"; buffer += "%%EndComments\n"; buffer += "%%EndProlog\n"; - buffer += "newpath\n"; for(var i = 0; i < this.array.length; i++){ for(var j = 0; j < this.array[i].array.length; j++){ buffer += (this.array[i].array[j].x * 5) + " " + (1000 - this.array[i].array[j].y * 5 - 200) + " "; if(j == 0){ - buffer += "moveto\n"; + buffer += "newpath\nmoveto\n"; } else { buffer += "lineto\n"; } } - buffer += "closepath\n"; + buffer += "closepath\nfill\n"; } - buffer += "fill\n"; buffer += "%%EOF\n"; return buffer; }