From 00906ef75e946fed811afc67b8b92c5a1aceae03 Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Tue, 3 Mar 2009 14:35:18 +0000 Subject: [PATCH] Fixed function of generating EPS file. --- engine/polygons.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 1.7.10.4