Changeset 420 for trunk/Jgraph/printline.c
- Timestamp:
- 02/27/08 07:13:31 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jgraph/printline.c
r419 r420 9 9 #include <stdio.h> 10 10 #include <assert.h> //by pzn@debian.org 11 #include <string.h> 11 12 12 13 #define LINEWIDTHFACTOR 0.700 … … 25 26 static int Jgraph_comment; 26 27 27 gsave()28 void gsave(void) 28 29 { 29 30 if (Jgraph_gsave_level == -100) { … … 35 36 } 36 37 37 grestore()38 void grestore(void) 38 39 { 39 40 Fontlist l; … … 50 51 } 51 52 52 setfont(f, s) 53 char *f; 54 float s; 53 void setfont(char *f, float s) 55 54 { 56 55 Fontlist l; … … 77 76 } 78 77 79 setfill( x, y, t, f, p, a) 80 char t, p ; 81 float x, y; 82 float f[], a ; 78 void setfill(float x, float y, char t, float f[], char p, float a) 83 79 { 84 80 /* fprintf(stderr, "Hello? %c %f %c %f\n", t, f[0], p, a); */ … … 102 98 } 103 99 104 setgray( t, f) 105 char t ; 106 float f[] ; 100 void setgray(char t, float f[]) 107 101 { 108 102 if ( t == 'g' ) { … … 113 107 } 114 108 115 printline(x1, y1,x2, y2, orientation) 116 float x1, y1, x2, y2; 117 char orientation; 109 void printline(float x1, float y1, float x2, float y2, char orientation) 118 110 { 119 111 if (orientation == 'x') … … 124 116 } 125 117 126 print_ebar(x1, y1, x2, ms, orientation) 127 float x1, y1, x2, ms; 128 char orientation; 118 void print_ebar(float x1, float y1, float x2, float ms, char orientation) 129 119 { 130 120 printline(x1, y1, x2, y1, orientation); … … 132 122 } 133 123 134 start_line(x1, y1, c) 135 float x1, y1; 136 Curve c; 124 void start_line(float x1, float y1, Curve c) 137 125 { 138 126 setlinewidth(c->linethick); … … 141 129 } 142 130 143 cont_line(x1, y1) 144 float x1, y1; 131 void cont_line(float x1, float y1) 145 132 { 146 133 printf(" %f %f lineto\n", x1, y1); 147 134 } 148 135 149 end_line()136 void end_line(void) 150 137 { 151 138 printf("stroke\n"); … … 156 143 } 157 144 158 bezier_control(x1, y1) 159 float x1, y1; 145 void bezier_control(float x1, float y1) 160 146 { 161 147 printf(" %f %f ", x1, y1); 162 148 } 163 149 164 bezier_end(x1, y1) 165 float x1, y1; 150 void bezier_end(float x1, float y1) 166 151 { 167 152 printf(" %f %f curveto\n", x1, y1); … … 169 154 170 155 171 start_poly(x1, y1) 172 float x1, y1; 156 void start_poly(float x1, float y1) 173 157 { 174 158 printf(" newpath %f %f moveto", x1, y1); 175 159 } 176 160 177 cont_poly(x1, y1) 178 float x1, y1; 161 void cont_poly(float x1, float y1) 179 162 { 180 163 printf(" %f %f lineto\n", x1, y1); 181 164 } 182 165 183 end_poly(x, y, ftype, fill, pattern, parg) 184 float x, y; 185 char ftype, pattern ; 186 float fill[], parg; 166 void end_poly(float x, float y, char ftype, float fill[], 167 char pattern, float parg) 187 168 { 188 169 printf("closepath "); … … 194 175 /* Ellipse at 0, 0 -- assumes that you've already translated to x, y */ 195 176 196 printellipse(x, y, radius1, radius2, ftype, fill, pattern, parg) 197 char ftype, pattern; 198 float x, y, radius1, radius2, fill[], parg; 177 void printellipse(float x, float y, float radius1, float radius2, 178 char ftype, float fill[], char pattern, float parg) 199 179 { 200 180 printf("newpath %f %f JDE\n", radius1, radius2); … … 204 184 } 205 185 206 set_comment(c) 207 int c; 186 void set_comment(int c) 208 187 { 209 188 Jgraph_comment = c; 210 189 } 211 190 212 comment(s) 213 char *s; 191 void comment(char *s) 214 192 { 215 193 if (Jgraph_comment) printf("%% %s\n", s); 216 194 } 217 195 218 printline_c(x1, y1, x2, y2, g) 219 float x1, y1, x2, y2; 220 Graph g; 196 void printline_c(float x1, float y1, float x2, float y2, Graph g) 221 197 { 222 198 printline(ctop(x1, g->x_axis), ctop(y1, g->y_axis), … … 224 200 } 225 201 226 print_label(l) 227 Label l; 202 void print_label(Label l) 228 203 { 229 204 int f, i, nlines; 230 205 float fnl; 231 206 char *s; 232 unsignedchar *s_7bit; // added by pzn@debian.org207 char *s_7bit; // added by pzn@debian.org 233 208 234 209 if (l->label == CNULL) return; … … 317 292 } 318 293 319 setlinewidth(size) 320 float size; 294 void setlinewidth(float size) 321 295 { 322 296 printf("%f setlinewidth ", size * LINEWIDTHFACTOR); 323 297 } 324 298 325 setlinestyle(style, glist) 326 char style; 327 Flist glist; 299 void setlinestyle(char style, Flist glist) 328 300 { 329 301 Flist fl;
Note:
See TracChangeset
for help on using the changeset viewer.