Rev 10 | Rev 7675 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10 | Rev 1024 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | 21 | ||
22 | #include "flydraw.h" |
22 | #include "flydraw.h" |
23 | #include "../Lib/libwims.h" |
23 | #include "../Lib/libwims.h" |
24 | 24 | ||
25 | char imagefilename[1024]; |
25 | char imagefilename[1024]; |
- | 26 | char vimgfilename[1024]; |
|
26 | int sizex, sizey, saved; |
27 | int sizex, sizey, saved; |
27 | gdImagePtr image=NULL, brushimg=NULL, tileimg=NULL, wimg=NULL; |
28 | gdImagePtr image=NULL, brushimg=NULL, tileimg=NULL, wimg=NULL; |
28 | int brushed=0,tiled=0,styled=0,width=1, savew=1, wcolor=-1; |
29 | int brushed=0,tiled=0,styled=0,width=1, savew=1, wcolor=-1; |
29 | int color_white,color_black,color_bounder; |
30 | int color_white,color_black,color_bounder; |
30 | int linecnt=-100000; |
31 | int linecnt=-100000; |
Line 37... | Line 38... | ||
37 | double transx=0,transy=0; /* translation vector */ |
38 | double transx=0,transy=0; /* translation vector */ |
38 | int lstep=4; |
39 | int lstep=4; |
39 | ev_variable vartab[MAX_VARS]; |
40 | ev_variable vartab[MAX_VARS]; |
40 | char varnamebuf[MAX_VARNAMEBUF], *varnameptr=varnamebuf; |
41 | char varnamebuf[MAX_VARNAMEBUF], *varnameptr=varnamebuf; |
41 | int varcnt; |
42 | int varcnt; |
- | 43 | int vimg=0; /* 0: no vector image output. |
|
- | 44 | * 1: DXF vector output. */ |
|
- | 45 | int vimg_enable=0; /* 0: disable. 1: enable. */ |
|
- | 46 | int vimg_ready=0; |
|
- | 47 | FILE *vimgf=NULL; |
|
- | 48 | double scale_buf[MAX_PARMS]; |
|
42 | /***** Les modifs a JC Fev 06 *****/ |
49 | /***** Les modifs a JC Fev 06 *****/ |
43 | /** les matrices suivantes sont initialisees par la commande setmatrix nummatrix,a11,a12,a21,a22 */ |
50 | /** les matrices suivantes sont initialisees par la commande setmatrix nummatrix,a11,a12,a21,a22 */ |
44 | /** elles sont remises a l'unite par resetmatrix nummatrix */ |
51 | /** elles sont remises a l'unite par resetmatrix nummatrix */ |
45 | double matrix01[] = {1,0,0,1}; |
52 | double matrix01[] = {1,0,0,1}; |
46 | double matrix02[] = {1,0,0,1}; |
53 | double matrix02[] = {1,0,0,1}; |
Line 123... | Line 130... | ||
123 | } |
130 | } |
124 | 131 | ||
125 | #include "lines.c" |
132 | #include "lines.c" |
126 | #include "nametab.c" |
133 | #include "nametab.c" |
127 | #include "evalue.c" |
134 | #include "evalue.c" |
- | 135 | #include "vimg.c" |
|
128 | #include "objects.c" |
136 | #include "objects.c" |
129 | 137 | ||
130 | void process(void) |
138 | void process(void) |
131 | { |
139 | { |
132 | char buf[MAX_LINELEN+1]; |
140 | char buf[MAX_LINELEN+1]; |
Line 157... | Line 165... | ||
157 | if(argc>1) snprintf(imagefilename,sizeof(imagefilename),"%s",argv[1]); |
165 | if(argc>1) snprintf(imagefilename,sizeof(imagefilename),"%s",argv[1]); |
158 | else imagefilename[0]=0; |
166 | else imagefilename[0]=0; |
159 | process(); |
167 | process(); |
160 | if(!saved || imagefilename[0]!=0) output(); |
168 | if(!saved || imagefilename[0]!=0) output(); |
161 | if(image) gdImageDestroy(image); |
169 | if(image) gdImageDestroy(image); |
- | 170 | if(vimg_ready) vimg_close(); |
|
162 | return 0; |
171 | return 0; |
163 | } |
172 | } |
164 | 173 |