X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kagecgi%2Fkageic.c;h=3edbe2fb0e91c695c36309d923d7a397dda9118c;hb=7a59f9631b96415cc5add984e077e99c579554a8;hp=eadef071ae43eccbff4d2125ea1dc507586bc3b8;hpb=586c15cce46997e512cae2e321240d5edd786f15;p=chise%2Fkage.git
diff --git a/kagecgi/kageic.c b/kagecgi/kageic.c
index eadef07..3edbe2f 100755
--- a/kagecgi/kageic.c
+++ b/kagecgi/kageic.c
@@ -4,33 +4,36 @@
#include "kage.h"
#include "kagecgi.h"
-void icPolygon(struct kPoint *poly, int number){
- int i;
- char buf[256];
-
- if(kMode == 0){ //normal
- fillPolygon(poly, number, 0, kageCanvas);
- }
- else if(kMode == 1){ //output for svg
- sprintf(buf, "");
- g_string_append(kResultText, buf);
- }
- else if(kMode == 2){ //output for eps
- sprintf(buf, "%d %d moveto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);
- g_string_append(kResultText, buf);
- for(i = 1; i < number; i++){
- sprintf(buf, " %d %d lineto\n", poly[i].X * 5, 1000 - (poly[i].Y * 5) - 200);
- g_string_append(kResultText, buf);
- }
- sprintf(buf, " %d %d lineto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);
- g_string_append(kResultText, buf);
- g_string_append(kResultText, "closepath\n");
- }
-
+void icPolygon(kPoint *poly, int number){
+ int i;
+ char buf[256];
+
+ if(kMode == 0){ //normal
+ fillPolygon(poly, number, 0, kageCanvas);
+ }
+ else if(kMode == 1){ //output for svg
+ sprintf(buf, "");
+ kg_string_append(kResultText, buf);
+ }
+ else if(kMode == 2){ //output for eps
+ sprintf(buf, "%.0f %.0f moveto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);
+ kg_string_append(kResultText, buf);
+ for(i = 1; i < number; i++){
+ sprintf(buf, " %.0f %.0f lineto\n", poly[i].X * 5, 1000 - (poly[i].Y * 5) - 200);
+ kg_string_append(kResultText, buf);
+ }
+ sprintf(buf, " %.0f %.0f lineto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);
+ kg_string_append(kResultText, buf);
+ kg_string_append(kResultText, "closepath\n");
+ }
}