#define kMaxIDCLength 16\r
#define kMaxStrokeDataLength 256 // over 12(digits per integer with +/- flag) * 11(columns) + 1(line end)\r
\r
-struct kPoint{\r
+typedef struct _kPoint{\r
double X;\r
double Y;\r
-};\r
+} kPoint;\r
\r
-struct kPoint poly[kResolution];\r
-struct kPoint poly2[3];\r
-struct kPoint poly3[5];\r
-struct kPoint poly4[4];\r
-\r
-struct EDGE {\r
- struct EDGE *next;\r
- long yTop, yBot;\r
- long xNowWhole, xNowNum, xNowDen, xNowDir;\r
- long xNowNumStep;\r
-};\r
-\r
-#define SGN(a) ( (a) > 0 ? 1 : ( (a) < 0 ? -1 : 0 ) )\r
+kPoint poly[kResolution];\r
+kPoint poly2[3];\r
+kPoint poly3[5];\r
+kPoint poly4[4];\r
\r
//kagedf.c\r
void dfDrawFont(int, int, int, int, int, 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
+void icPolygon(kPoint *, int);\r
\r
#endif\r
#include "sysdep.h"\r
\r
void generateGlyphByIDS(const GString *in, GString *out, int flag){\r
- GString *tmp1, *tmp2, *tmp3, *tmp4;\r
+ GString *tmp1, *tmp2;\r
\r
//pass this method if 'in' is not UCS parts\r
if((in->str)[0] != 'u'){\r
\r
tmp1 = g_string_new(in->str);\r
tmp2 = g_string_new(in->str);\r
-// tmp3 = g_string_new(in->str);\r
-// tmp4 = g_string_new(in->str);\r
- \r
- //append design flag\r
-// if(kDesign == 10) g_string_append(tmp1, "-10");\r
-// else if(kDesign == 11) g_string_append(tmp1, "-11");\r
-// else if(kDesign == 20) g_string_append(tmp1, "-20");\r
-// else if(kDesign == 30) g_string_append(tmp1, "-30");\r
-// else if(kDesign == 40) g_string_append(tmp1, "-40");\r
-// else g_string_append(tmp1, "-00");\r
-// if(kDesign == 10) g_string_append(tmp2, "-10");\r
-// else if(kDesign == 11) g_string_append(tmp2, "-11");\r
-// else if(kDesign == 20) g_string_append(tmp2, "-20");\r
-// else if(kDesign == 30) g_string_append(tmp2, "-30");\r
-// else if(kDesign == 40) g_string_append(tmp2, "-40");\r
-// else g_string_append(tmp2, "-00");\r
-// g_string_append(tmp3, "-00");\r
-// g_string_append(tmp4, "-00");\r
\r
//append place flag\r
if(1 <= flag && flag <= 7){\r
else if(flag == 6) g_string_append(tmp1, "06");\r
}\r
\r
-// g_string_append(tmp2, "00");\r
-// if(flag == 1) g_string_append(tmp3, "01");\r
-// else if(flag == 2) g_string_append(tmp3, "02");\r
-// else if(flag == 3) g_string_append(tmp3, "03");\r
-// else if(flag == 4) g_string_append(tmp3, "04");\r
-// else if(flag == 5) g_string_append(tmp3, "05");\r
-// else if(flag == 6) g_string_append(tmp3, "06");\r
-// else g_string_append(tmp3, "00");\r
-// g_string_append(tmp4, "00");\r
- \r
generateGlyph(tmp1, out);\r
if(out->len != 0) return;\r
generateGlyph(tmp2, out);\r
if(out->len != 0) return;\r
-// generateGlyph(tmp3, out);\r
-// if(out->len != 0) return;\r
-// generateGlyph(tmp4, out);\r
return;\r
}\r
\r
void generateGlyph(const GString *in, GString *out){\r
- GString *tmp, *in2;\r
+ GString *tmp;\r
tmp = g_string_new("");\r
g_string_set_size(out, 0);\r
\r
-// in2 = g_string_new(in->str);\r
- \r
- //1st search\r
-// if(*(in2->str) == 'u' && (in2->len == 4 || in2->len == 5)){\r
-// //append design flag\r
-// if(kDesign == 10) g_string_append(in2, "-1000");\r
-// else if(kDesign == 11) g_string_append(in2, "-1100");\r
-// else if(kDesign == 20) g_string_append(in2, "-2000");\r
-// else if(kDesign == 30) g_string_append(in2, "-3000");\r
-// else if(kDesign == 40) g_string_append(in2, "-4000");\r
-// else g_string_append(in2, "-0000");\r
- \r
- //search from parts(1st)\r
-// searchPartsData(in2, tmp);\r
-// if(tmp->len != 0){\r
-// g_string_assign(out, tmp->str);\r
-// return;\r
-// }\r
- \r
- //search from alias(1st)\r
-// searchAliasData(in2, tmp);\r
-// if(tmp->len != 0){\r
-// generateGlyph(tmp, out);\r
-// if(out->len == 0) return;\r
-// //save to cache ... not yet\r
-// return;\r
-// }\r
-// }\r
- \r
- //2nd search\r
- //search from parts(2nd)\r
+ //search from parts\r
searchPartsData(in, tmp);\r
if(tmp->len != 0){\r
tmp = CalcSizes(tmp, 1);\r
return;\r
}\r
\r
- //search from alias(2nd)\r
+ //search from alias\r
searchAliasData(in, tmp);\r
if(tmp->len != 0){\r
generateGlyph(tmp, out);\r