g = 0;\r
\r
//calculate width of each parts #2\r
-// pxL = kWidth * 2 + (pngWidth - kWidth * 2 * 2) * prL * 0.5 - (lxL + rxL) / 2 * prL;\r
-// pxR = kWidth * 2 + (pngWidth - kWidth * 2 * 2) * prL + kWidth * 2 * 2 + (pngWidth - kWidth * 2 * 2) * prR * 0.5 - (lxR + rxR) / 2 * prR;\r
- pxL = pngWidth * prL * 0.5 - (lxL + rxL) / 2 * prL;\r
- pxR = pngWidth * prL + kWidth * 4 + pngWidth * prR * 0.5 - (lxR + rxR) / 2 * prR;\r
+//1 pxL = kWidth * 2 + (pngWidth - kWidth * 2 * 2) * prL * 0.5 - (lxL + rxL) / 2 * prL;\r
+//1 pxR = kWidth * 2 + (pngWidth - kWidth * 2 * 2) * prL + kWidth * 2 * 2 + (pngWidth - kWidth * 2 * 2) * prR * 0.5 - (lxR + rxR) / 2 * prR;\r
+//2 pxR = pngWidth * prL + kWidth * 4 + pngWidth * prR * 0.5 - (lxR + rxR) / 2 * prR;\r
+//3 pxL = pngWidth * prL * 0.5 - (lxL + rxL) / 2 * prL;\r
+//3 pxR = pngWidth * prL + pngWidth * prR * 0.5 - (lxR + rxR) / 2 * prR;\r
+ pxL = 0;\r
+ pxR = pngWidth * prL;\r
\r
DoDrawMixFont(parts1, pxL, prL, parts3, pxR, prR, pyL, pryL, pyR, pryR);\r
\r
}\r
}\r
l = k;\r
+ //fprintf(stderr,"%d,%d\n",chk_y1,chk_y2);\r
\r
//get close both parts\r
h = pxR;\r
- while(k - l < kMixdot && g < kWidth * (kKasane + 4)){\r
+ while(k - l < kMixdot && g < kWidth * 2 * kKasane * 2){\r
g = g + 2;\r
f = pxR - g;\r
DoDrawMixFont(parts1, pxL, prL, parts3, f, prR, pyL, pryL, pyR, pryR);\r
\r
+ //char fn[256];\r
+ //FILE *fp;\r
+ //snprintf(fn,sizeof(fn),"%03d.png",g);\r
+ //fp = fopen(fn, "w");\r
+ //writePng(pngWidth, pngHeight, kageCanvas, fp);\r
+ //fclose(fp);\r
+ \r
l = 0;\r
for(i = 0; i < pngWidth * 1.1; i++){\r
- for(j = chk_y1; j <= chk_y2; j++){\r
+ for(j = chk_y1; j <= chk_y2; j++){\r
if(kageCanvas[j][i] == 0) l++;\r
}\r
}\r
}\r
+ //fprintf(stderr,"%d:%d:%d\n",g,k,l);\r
pxR = f;\r
- if(flg_boxR % 256 / 128 != 0) pxR = pxR + kWidth * 12;\r
- if(flg_boxR % 64 / 32 != 0) pxR = pxR + kWidth * 8;\r
- else if(k - l > pngWidth * 0.4) pxR = pxR + kWidth * 5;\r
- else pxR = pxR + kWidth * 3;\r
+ //if(flg_boxR % 256 / 128 != 0) pxR = pxR + kWidth * 2 * kKasane * 10 / 2;\r
+ //if(flg_boxR % 64 / 32 != 0) pxR = pxR + kWidth * 2 * kKasane * 8 / 2;\r
+ //else if(k - l > pngWidth * 0.4){\r
+ // if(kShotai == kMincho) pxR = pxR + kMinWidthT * 2 * kKasane * 8 / 2;\r
+ // else if(kShotai == kGothic) pxR = pxR + kWidth * 2 * kKasane * 8 / 2;\r
+ //}\r
+ if((flg_boxL % 2 / 1 != 0) && (flg_boxR % 4 / 2 != 0)){\r
+ if(kShotai == kMincho) pxR = pxR + kMinWidthT * 2 * kKasane * 6 / 2;\r
+ else pxR = pxR + kWidth * 2 * kKasane * 6 / 2;\r
+ }\r
+ else pxR = pxR + kWidth * 2 * kKasane * 2 / 2;\r
\r
//set results\r
result[0] = pxL;\r