//kagecd.c\r
//\r
#include "kage.h"\r
+#include "kagecgi.h"\r
\r
void cdDrawBezier(double x1, double y1,\r
double x2, double y2,\r
}\r
\r
void cdDrawLine(double tx1, double ty1, double tx2, double ty2, int ta1, int ta2){\r
- double rad;\r
- double v, x1, y1, x2, y2;\r
- int a1, a2;\r
- double XX, XY, YX, YY;\r
+ double rad;\r
+ double v, x1, y1, x2, y2;\r
+ int a1, a2;\r
+ double XX, XY, YX, YY;\r
+ int uroko;\r
\r
if(kShotai == kMincho){ //mincho\r
x1 = tx1;\r
\r
//UROKO\r
if(a2 == 0){\r
- poly2[0].X = x2;\r
- poly2[0].Y = y2 - kMinWidthY;\r
- poly2[1].X = x2 - 24;\r
- poly2[1].Y = y2;\r
- poly2[2].X = x2 - 12;\r
- poly2[2].Y = y2 - 12;\r
- icPolygon(poly2, 3);\r
+ uroko = kUroko;\r
+ if((x2 - x1 - kWidth) < uroko){\r
+ uroko = max((x2 - x1 - kWidth), 4);\r
+ }\r
+ poly2[0].X = x2;\r
+ poly2[0].Y = y2 - kMinWidthY;\r
+ poly2[1].X = x2 - uroko;\r
+ poly2[1].Y = y2;\r
+ poly2[2].X = x2 - uroko / 2;\r
+ poly2[2].Y = y2 - uroko / 2;\r
+ icPolygon(poly2, 3);\r
}\r
}\r
}\r
\r
//UROKO\r
if(a2 == 0){\r
+ uroko = kUroko;\r
+ if((x2 - x1 - kWidth * cos(rad)) < uroko * cos(rad)){\r
+ uroko = max(((x2 - x1) / cos(rad) - kWidth), 4);\r
+ }\r
poly2[0].X = x2 + sin(rad) * kMinWidthY;\r
poly2[0].Y = y2 - cos(rad) * kMinWidthY;\r
- poly2[1].X = x2 - cos(rad) * 24;\r
- poly2[1].Y = y2 - sin(rad) * 24;\r
- poly2[2].X = x2 - cos(rad) * 12 + sin(rad) * 12;\r
- poly2[2].Y = y2 - sin(rad) * 12 - cos(rad) * 12;\r
+ poly2[1].X = x2 - cos(rad) * uroko;\r
+ poly2[1].Y = y2 - sin(rad) * uroko;\r
+ poly2[2].X = x2 - cos(rad) * uroko / 2 + sin(rad) * uroko / 2;\r
+ poly2[2].Y = y2 - sin(rad) * uroko / 2 - cos(rad) * uroko / 2;\r
icPolygon(poly2, 3);\r
}\r
}\r