23 #ifndef Fl_PostScript_H
24 #define Fl_PostScript_H
32 typedef int (Fl_PostScript_Close_Command)(FILE *);
63 void transformed_draw_extra(
const char* str,
int n,
double x,
double y,
int w,
bool rtl);
64 void *prepare_rle85();
65 void write_rle85(
uchar b,
void *data);
66 void close_rle85(
void *data);
68 void write85(
void *data,
const uchar *p,
int len);
69 void close85(
void *data);
71 static const char *class_id;
75 enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS};
95 unsigned char cr_,cg_,cb_;
106 Fl_PostScript_Close_Command* close_cmd_;
120 uchar bg_r, bg_g, bg_b;
124 void transformed_draw(
const char* s,
int n,
double x,
double y);
125 void transformed_draw(
const char* s,
double x,
double y);
126 int alpha_mask(
const uchar * data,
int w,
int h,
int D,
int LD=0);
131 void page_policy(
int p);
132 int page_policy(){
return page_policy_;};
133 void close_command(Fl_PostScript_Close_Command* cmd){close_cmd_=cmd;};
134 FILE * file() {
return output;};
138 void interpolate(
int i){interpolate_=i;};
139 int interpolate(){
return interpolate_;}
141 void page(
double pw,
double ph,
int media = 0);
142 void page(
int format);
149 void push_clip(
int x,
int y,
int w,
int h);
150 int clip_box(
int x,
int y,
int w,
int h,
int &X,
int &Y,
int &W,
int &H);
155 void line_style(
int style,
int width=0,
char* dashes=0);
157 void rect(
int x,
int y,
int w,
int h);
158 void rectf(
int x,
int y,
int w,
int h);
160 void xyline(
int x,
int y,
int x1);
161 void xyline(
int x,
int y,
int x1,
int y2);
162 void xyline(
int x,
int y,
int x1,
int y2,
int x3);
164 void yxline(
int x,
int y,
int y1);
165 void yxline(
int x,
int y,
int y1,
int x2);
166 void yxline(
int x,
int y,
int y1,
int x2,
int y3);
168 void line(
int x1,
int y1,
int x2,
int y2);
169 void line(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
171 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
172 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
173 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
174 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
175 void point(
int x,
int y);
181 void vertex(
double x,
double y);
182 void curve(
double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3);
183 void circle(
double x,
double y,
double r);
184 void arc(
double x,
double y,
double r,
double start,
double a);
185 void arc(
int x,
int y,
int w,
int h,
double a1,
double a2);
186 void pie(
int x,
int y,
int w,
int h,
double a1,
double a2);
196 void draw_image(
const uchar* d,
int x,
int y,
int w,
int h,
int delta=3,
int ldelta=0);
201 void draw(
const char* s,
int nBytes,
int x,
int y) {transformed_draw(s,nBytes,x,y); };
203 void draw(
const char* s,
int nBytes,
float x,
float y) {transformed_draw(s,nBytes,x,y); };
205 void draw(
int angle,
const char *str,
int n,
int x,
int y);
206 void rtl_draw(
const char* s,
int n,
int x,
int y);
207 void font(
int face,
int size);
208 double width(
const char *,
int);
209 double width(
unsigned int u);
210 void text_extents(
const char *c,
int n,
int &dx,
int &dy,
int &w,
int &h);
213 void draw(
Fl_Pixmap * pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
214 void draw(
Fl_Bitmap * bitmap,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
215 void draw(
Fl_RGB_Image * rgb,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
217 int clocale_printf(
const char *format, ...);
233 static const char *class_id;
237 int start_job(
int pagecount,
int* from,
int* to);
244 void margins(
int *left,
int *top,
int *right,
int *bottom);
245 void origin(
int *x,
int *y);
246 void origin(
int x,
int y);
247 void scale (
float scale_x,
float scale_y = 0.);
260 #endif // Fl_PostScript_H