X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kagecgi%2Fkageic.c;h=3edbe2fb0e91c695c36309d923d7a397dda9118c;hb=7a59f9631b96415cc5add984e077e99c579554a8;hp=ad67f0aecd2385596a91582b01cf05c30b68e79a;hpb=69bb94daa370115ef4895f3ffbd28a7d8ccd960e;p=chise%2Fkage.git diff --git a/kagecgi/kageic.c b/kagecgi/kageic.c index ad67f0a..3edbe2f 100755 --- a/kagecgi/kageic.c +++ b/kagecgi/kageic.c @@ -5,32 +5,35 @@ #include "kagecgi.h" 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"); - } - + 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"); + } }