#define kMaxStrokeDataLength 256 // over 12(digits per integer with +/- flag) * 11(columns) + 1(line end)\r
\r
struct kPoint{\r
- int X;\r
- int Y;\r
+ double X;\r
+ double Y;\r
};\r
\r
XPoint xpoly[kResolution];\r
//kagedf.c\r
void dfDrawFont(int, int, int, int, int, int, int, int, int, int, int);\r
//kagecd.c\r
-void cdDrawCurve(int, int, int, int, int, int, int, int);\r
-void cdDrawLine(int, int, int, int, int, int);\r
+void cdDrawCurve(double, double, double, double, double, double, int, int);\r
+void cdDrawLine(double, double, double, double, int, int);\r
//kageic.c\r
void icPolygon(struct kPoint *, int);\r
\r
//\r
#include "kage.h"\r
\r
-void cdDrawCurve(int x1, int y1,\r
- int x2, int y2,\r
- int x3, int y3,\r
+void cdDrawCurve(double x1, double y1,\r
+ double x2, double y2,\r
+ double x3, double y3,\r
int a1, int a2){\r
\r
double rad, t;\r
double x, y, v;\r
double ix, iy, ia, ib, ir;\r
int count, tt;\r
- int delta;\r
+ double delta;\r
double deltad;\r
double XX, XY, YX, YY;\r
\r
}\r
}\r
\r
-void cdDrawLine(int tx1, int ty1, int tx2, int ty2, int ta1, int ta2){\r
+void cdDrawLine(double tx1, double ty1, double tx2, double ty2, int ta1, int ta2){\r
double rad;\r
- int v, x1, y1, x2, y2, a1, a2;\r
+ double v, x1, y1, x2, y2;\r
+ int a1, a2;\r
double XX, XY, YX, YY;\r
\r
if(kShotai == kMincho){ //mincho\r
sprintf(buf, "<path d=\"M ");\r
g_string_append(kResultText, buf);\r
for(i = 0; i < number; i++){\r
- sprintf(buf, "%d,%d ", poly[i].X * 5, poly[i].Y * 5);\r
+ sprintf(buf, "%.0f,%.0f ", poly[i].X * 5, poly[i].Y * 5);\r
g_string_append(kResultText, buf);\r
}\r
sprintf(buf, "Z\"/>");\r
g_string_append(kResultText, buf);\r
}\r
else if(kMode == 2){ //output for eps\r
- sprintf(buf, "%d %d moveto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);\r
+ sprintf(buf, "%.0f %.0f moveto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);\r
g_string_append(kResultText, buf);\r
for(i = 1; i < number; i++){\r
- sprintf(buf, " %d %d lineto\n", poly[i].X * 5, 1000 - (poly[i].Y * 5) - 200);\r
+ sprintf(buf, " %.0f %.0f lineto\n", poly[i].X * 5, 1000 - (poly[i].Y * 5) - 200);\r
g_string_append(kResultText, buf);\r
}\r
- sprintf(buf, " %d %d lineto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);\r
+ sprintf(buf, " %.0f %.0f lineto\n", poly[0].X * 5, 1000 - (poly[0].Y * 5) - 200);\r
g_string_append(kResultText, buf);\r
g_string_append(kResultText, "closepath\n");\r
}\r