23 #ifndef Fl_PostScript_H
24 #define Fl_PostScript_H
57 static const char *class_id;
61 enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS};
81 unsigned char cr_,cg_,cb_;
92 int (*close_cmd_)(FILE *);
106 uchar bg_r, bg_g, bg_b;
110 void transformed_draw(
const char* s,
int n,
double x,
double y);
111 void transformed_draw(
const char* s,
double x,
double y);
112 int alpha_mask(
const uchar * data,
int w,
int h,
int D,
int LD=0);
117 void page_policy(
int p);
118 int page_policy(){
return page_policy_;};
119 void close_command(
int (*cmd)(FILE *)){close_cmd_=cmd;};
120 FILE * file() {
return output;};
124 void interpolate(
int i){interpolate_=i;};
125 int interpolate(){
return interpolate_;}
127 void page(
double pw,
double ph,
int media = 0);
128 void page(
int format);
135 void push_clip(
int x,
int y,
int w,
int h);
136 int clip_box(
int x,
int y,
int w,
int h,
int &X,
int &Y,
int &W,
int &H);
141 void line_style(
int style,
int width=0,
char* dashes=0);
143 void rect(
int x,
int y,
int w,
int h);
144 void rectf(
int x,
int y,
int w,
int h);
146 void xyline(
int x,
int y,
int x1);
147 void xyline(
int x,
int y,
int x1,
int y2);
148 void xyline(
int x,
int y,
int x1,
int y2,
int x3);
150 void yxline(
int x,
int y,
int y1);
151 void yxline(
int x,
int y,
int y1,
int x2);
152 void yxline(
int x,
int y,
int y1,
int x2,
int y3);
154 void line(
int x1,
int y1,
int x2,
int y2);
155 void line(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
157 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
158 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
159 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
160 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
161 void point(
int x,
int y);
167 void vertex(
double x,
double y);
168 void curve(
double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3);
169 void circle(
double x,
double y,
double r);
170 void arc(
double x,
double y,
double r,
double start,
double a);
171 void arc(
int x,
int y,
int w,
int h,
double a1,
double a2);
172 void pie(
int x,
int y,
int w,
int h,
double a1,
double a2);
182 void draw_image(
const uchar* d,
int x,
int y,
int w,
int h,
int delta=3,
int ldelta=0);
187 void draw(
const char* s,
int nBytes,
int x,
int y) {transformed_draw(s,nBytes,x,y); };
189 void draw(
const char* s,
int nBytes,
float x,
float y) {transformed_draw(s,nBytes,x,y); };
191 void draw(
int angle,
const char *str,
int n,
int x,
int y);
192 void rtl_draw(
const char* s,
int n,
int x,
int y);
193 void font(
int face,
int size);
194 double width(
const char *,
int);
195 void text_extents(
const char *c,
int n,
int &dx,
int &dy,
int &w,
int &h);
198 void draw(
Fl_Pixmap * pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
199 void draw(
Fl_Bitmap * bitmap,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
200 void draw(
Fl_RGB_Image * rgb,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
214 static const char *class_id;
224 void margins(
int *left,
int *top,
int *right,
int *bottom);
225 void origin(
int *x,
int *y);
226 void origin(
int x,
int y);
227 void scale (
float scale_x,
float scale_y = 0.);
240 #endif // Fl_PostScript_H