projects
/
chise
/
kage.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed combining function.
[chise/kage.git]
/
kagecgi
/
kagetool.c
diff --git
a/kagecgi/kagetool.c
b/kagecgi/kagetool.c
index
91cacdf
..
77a2147
100755
(executable)
--- a/
kagecgi/kagetool.c
+++ b/
kagecgi/kagetool.c
@@
-3,8
+3,7
@@
\r
#include "kage.h"
\r
#include "kagecgi.h"
\r
\r
#include "kage.h"
\r
#include "kagecgi.h"
\r
-#include <stdlib.h>
\r
-#include <png.h>
\r
+#include "sysdep.h"
\r
\r
void DotsWidth(int *dlx, int *drx){
\r
int i, j;
\r
\r
void DotsWidth(int *dlx, int *drx){
\r
int i, j;
\r
@@
-54,7
+53,7
@@
void DotsHeight(int *dly, int *dry){
}
\r
}
\r
\r
}
\r
}
\r
\r
-void PartsWidth(const GString *in, int *lx, int *rx){
\r
+void PartsWidth(const KGString *in, int *lx, int *rx){
\r
int i;
\r
int *buf, strokes;
\r
\r
int i;
\r
int *buf, strokes;
\r
\r
@@
-81,7
+80,7
@@
void PartsWidth(const GString *in, int *lx, int *rx){
free(buf);
\r
}
\r
\r
free(buf);
\r
}
\r
\r
-void PartsHeight(const GString *in, int *ly, int *ry){
\r
+void PartsHeight(const KGString *in, int *ly, int *ry){
\r
int i;
\r
int *buf, strokes;
\r
\r
int i;
\r
int *buf, strokes;
\r
\r
@@
-108,7
+107,7
@@
void PartsHeight(const GString *in, int *ly, int *ry){
free(buf);
\r
}
\r
\r
free(buf);
\r
}
\r
\r
-GString * CalcSizes(const GString *in, int mode){
\r
+KGString * CalcSizes(const KGString *in, int mode){
\r
int i, j, k, basewidth, one_lineX, one_lineY;
\r
int dlx1, drx1, dly1, dry1;
\r
int px1, py1;
\r
int i, j, k, basewidth, one_lineX, one_lineY;
\r
int dlx1, drx1, dly1, dry1;
\r
int px1, py1;
\r
@@
-120,9
+119,9
@@
GString * CalcSizes(const GString *in, int mode){
\r
int *buf, strokes;
\r
int tf[12];
\r
\r
int *buf, strokes;
\r
int tf[12];
\r
- GString *out;
\r
+ KGString *out;
\r
\r
\r
- out = g_string_new("");
\r
+ out = kg_string_new("");
\r
basewidth = pngWidth * 0.9;
\r
\r
if(mode == 0){
\r
basewidth = pngWidth * 0.9;
\r
\r
if(mode == 0){
\r
@@
-233,7
+232,7
@@
GString * CalcSizes(const GString *in, int mode){
tf[2] = px1 + pr1 * 200;
\r
tf[3] = py1 + pry1 * 200;
\r
addStrokeWithTransform(in, 1, tf, out, 0);
\r
tf[2] = px1 + pr1 * 200;
\r
tf[3] = py1 + pry1 * 200;
\r
addStrokeWithTransform(in, 1, tf, out, 0);
\r
- return g_string_new(out->str);
\r
+ return kg_string_new(out->str);
\r
}
\r
\r
void DrawBox(){
\r
}
\r
\r
void DrawBox(){
\r
@@
-246,7
+245,7
@@
void DrawBox(){
}
\r
}
\r
\r
}
\r
}
\r
\r
-void CalcOptions(const GString *in, int *mitsudo, int *flag, double *yoko, double *tate){
\r
+void CalcOptions(const KGString *in, int *mitsudo, int *flag, double *yoko, double *tate){
\r
int i, j, k, l, flg;
\r
int dlx1, drx1, dly1, dry1;
\r
int kari, mode;
\r
int i, j, k, l, flg;
\r
int dlx1, drx1, dly1, dry1;
\r
int kari, mode;
\r
@@
-387,7
+386,7
@@
void CalcOptions(const GString *in, int *mitsudo, int *flag, double *yoko, doubl
buf = convertStroke(in->str, buf, &strokes);
\r
for(i = 0; i < strokes; i++){
\r
if(buf[i * 11 + 0] % 10 == 0){
\r
buf = convertStroke(in->str, buf, &strokes);
\r
for(i = 0; i < strokes; i++){
\r
if(buf[i * 11 + 0] % 10 == 0){
\r
- if(buf[i * 11 + 1] != 0){ *yoko = (double)(buf[i * 11 + 1]) * 0.1;fprintf(stderr,"@@@@@\r\n");}
\r
+ if(buf[i * 11 + 1] != 0) *yoko = (double)(buf[i * 11 + 1]) * 0.1;
\r
if(buf[i * 11 + 2] != 0) *tate = (double)(buf[i * 11 + 2]) * 0.1;
\r
if(buf[i * 11 + 3] != 0) *flag = *flag + buf[i * 11 + 3] * 16;
\r
}
\r
if(buf[i * 11 + 2] != 0) *tate = (double)(buf[i * 11 + 2]) * 0.1;
\r
if(buf[i * 11 + 3] != 0) *flag = *flag + buf[i * 11 + 3] * 16;
\r
}
\r
@@
-395,7
+394,7
@@
void CalcOptions(const GString *in, int *mitsudo, int *flag, double *yoko, doubl
free(buf);
\r
}
\r
\r
free(buf);
\r
}
\r
\r
-void DoDrawParts(const GString *in, const int lx1, const double rf1, const int ly1, const double rfy1){
\r
+void DoDrawParts(const KGString *in, const int lx1, const double rf1, const int ly1, const double rfy1){
\r
int i;
\r
int *buf, strokes;
\r
\r
int i;
\r
int *buf, strokes;
\r
\r
@@
-417,10
+416,10
@@
void DoDrawParts(const GString *in, const int lx1, const double rf1, const int l
free(buf);
\r
}
\r
\r
free(buf);
\r
}
\r
\r
-void DoDrawMixFont(const GString *in1,
\r
+void DoDrawMixFont(const KGString *in1,
\r
const int lx1,
\r
const double rf1,
\r
const int lx1,
\r
const double rf1,
\r
- const GString *in2,
\r
+ const KGString *in2,
\r
const int lx2,
\r
const double rf2,
\r
const int ly1,
\r
const int lx2,
\r
const double rf2,
\r
const int ly1,
\r