32 #ifndef Fl_PostScript_H
33 #define Fl_PostScript_H
66 static const char *class_id;
70 enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS};
90 unsigned char cr_,cg_,cb_;
101 int (*close_cmd_)(FILE *);
115 uchar bg_r, bg_g, bg_b;
119 void transformed_draw(
const char* s,
int n,
double x,
double y);
120 void transformed_draw(
const char* s,
double x,
double y);
121 int alpha_mask(
const uchar * data,
int w,
int h,
int D,
int LD=0);
126 void page_policy(
int p);
127 int page_policy(){
return page_policy_;};
128 void close_command(
int (*cmd)(FILE *)){close_cmd_=cmd;};
129 FILE * file() {
return output;};
133 void interpolate(
int i){interpolate_=i;};
134 int interpolate(){
return interpolate_;}
136 void page(
double pw,
double ph,
int media = 0);
137 void page(
int format);
144 void push_clip(
int x,
int y,
int w,
int h);
145 int clip_box(
int x,
int y,
int w,
int h,
int &X,
int &Y,
int &W,
int &H);
150 void line_style(
int style,
int width=0,
char* dashes=0);
152 void rect(
int x,
int y,
int w,
int h);
153 void rectf(
int x,
int y,
int w,
int h);
155 void xyline(
int x,
int y,
int x1);
156 void xyline(
int x,
int y,
int x1,
int y2);
157 void xyline(
int x,
int y,
int x1,
int y2,
int x3);
159 void yxline(
int x,
int y,
int y1);
160 void yxline(
int x,
int y,
int y1,
int x2);
161 void yxline(
int x,
int y,
int y1,
int x2,
int y3);
163 void line(
int x1,
int y1,
int x2,
int y2);
164 void line(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
166 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
167 void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
168 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
169 void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
170 void point(
int x,
int y);
176 void vertex(
double x,
double y);
177 void curve(
double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3);
178 void circle(
double x,
double y,
double r);
179 void arc(
double x,
double y,
double r,
double start,
double a);
180 void arc(
int x,
int y,
int w,
int h,
double a1,
double a2);
181 void pie(
int x,
int y,
int w,
int h,
double a1,
double a2);
191 void draw_image(
const uchar* d,
int x,
int y,
int w,
int h,
int delta=3,
int ldelta=0);
196 void draw(
const char* s,
int n,
int x,
int y) {transformed_draw(s,n,x,y); };
198 void draw(
const char* s,
int n,
float x,
float y) {transformed_draw(s,n,x,y); };
200 void draw(
int angle,
const char *str,
int n,
int x,
int y);
201 void rtl_draw(
const char* s,
int n,
int x,
int y);
202 void font(
int face,
int size);
203 double width(
const char *,
int);
204 void text_extents(
const char *c,
int n,
int &dx,
int &dy,
int &w,
int &h);
207 void draw(
Fl_Pixmap * pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
208 void draw(
Fl_Bitmap * bitmap,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
209 void draw(
Fl_RGB_Image * rgb,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
223 static const char *class_id;
233 void margins(
int *left,
int *top,
int *right,
int *bottom);
234 void origin(
int *x,
int *y);
235 void origin(
int x,
int y);
236 void scale (
float scale_x,
float scale_y = 0.);
249 #endif // Fl_PostScript_H
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_PostScript.H:224
virtual void begin_points()
see fl_begin_points().
Definition: fl_vertex.cxx:84
virtual int start_job(int pagecount, int *frompage=NULL, int *topage=NULL)
Starts a print job.
Definition: Fl_Paged_Device.cxx:159
virtual void begin_loop()
see fl_begin_loop().
Definition: fl_vertex.cxx:88
Represents page-structured drawing surfaces.
Definition: Fl_Paged_Device.H:47
virtual void draw_image(const uchar *buf, int X, int Y, int W, int H, int D=3, int L=0)=0
see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L).
The Fl_Pixmap class supports caching and drawing of colormap (pixmap) images, including transparency...
Definition: Fl_Pixmap.H:47
virtual void text_extents(const char *, int n, int &dx, int &dy, int &w, int &h)
see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h).
Definition: Fl_Device.cxx:67
virtual void margins(int *left, int *top, int *right, int *bottom)
Computes the dimensions of margins that lie between the printable page area and the full page...
Definition: Fl_Paged_Device.cxx:191
virtual void pop_clip()
see fl_pop_clip().
Definition: fl_rect.cxx:612
virtual void rect(int x, int y, int w, int h)
see fl_rect(int x, int y, int w, int h).
Definition: fl_rect.cxx:167
virtual void draw(const char *str, int n, int x, int y)=0
see fl_draw(const char *str, int n, int x, int y).
virtual void set_current(void)
Use this drawing surface for future graphics requests.
Definition: Fl_Device.cxx:48
virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2)
see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2).
Definition: fl_rect.cxx:395
virtual int not_clipped(int x, int y, int w, int h)
see fl_not_clipped(int x, int y, int w, int h).
Definition: fl_rect.cxx:620
virtual void xyline(int x, int y, int x1)
see fl_xyline(int x, int y, int x1).
Definition: fl_rect.cxx:213
virtual void scale(float scale_x, float scale_y=0.)
Changes the scaling of page coordinates.
Definition: Fl_Paged_Device.cxx:217
void(* Fl_Draw_Image_Cb)(void *data, int x, int y, int w, uchar *buf)
signature of image generation callback function.
Definition: Fl_Device.H:56
Page_Layout
Possible page layouts.
Definition: Fl_Paged_Device.H:90
virtual int descent()=0
see fl_descent().
virtual void point(int x, int y)
see fl_point(int x, int y).
Definition: fl_rect.cxx:502
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:175
virtual void end_loop()
see fl_end_loop().
Definition: fl_vertex.cxx:168
virtual void transformed_vertex(double xf, double yf)
see fl_transformed_vertex(double xf, double yf).
Definition: fl_vertex.cxx:112
virtual int height()=0
see fl_height().
virtual void draw_image_mono(const uchar *buf, int X, int Y, int W, int H, int D=1, int L=0)=0
see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L).
virtual void end_job(void)
To be called at the end of a print job.
Definition: Fl_Paged_Device.cxx:238
virtual void rtl_draw(const char *str, int n, int x, int y)=0
see fl_rtl_draw(const char *str, int n, int x, int y).
virtual void untranslate(void)
Undoes the effect of a previous translate() call.
Definition: Fl_Paged_Device.cxx:252
virtual void origin(int x, int y)
Sets the position in page coordinates of the origin of graphics functions.
Definition: Fl_Paged_Device.cxx:204
virtual void begin_polygon()
see fl_begin_polygon().
Definition: fl_vertex.cxx:90
virtual void end_line()
see fl_end_line().
Definition: fl_vertex.cxx:142
static const char * file_chooser_title
Label of the PostScript file chooser window.
Definition: Fl_PostScript.H:246
virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2)
see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2).
Definition: fl_rect.cxx:450
Fl_Color color()
see fl_color(void).
Definition: Fl_Device.H:391
virtual void rotate(float angle)
Rotates the graphics operations relatively to paper.
Definition: Fl_Paged_Device.cxx:226
virtual void line_style(int style, int width=0, char *dashes=0)
see fl_line_style(int style, int width, char* dashes).
Definition: fl_line_style.cxx:59
virtual double width(const char *str, int n)=0
see fl_width(const char *str, int n).
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_PostScript.H:67
void gap()
see fl_gap().
Definition: Fl_PostScript.H:187
PostScript graphical backend.
Definition: Fl_PostScript.H:64
virtual void begin_line()
see fl_begin_line().
Definition: fl_vertex.cxx:86
Fl_Font font()
see fl_font(void).
Definition: Fl_Device.H:377
virtual void curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
see fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3...
Definition: fl_curve.cxx:41
declaration of class Fl_Paged_Device.
void begin_complex_polygon()
see fl_begin_complex_polygon().
Definition: Fl_PostScript.H:186
Page_Format
Possible page formats.
Definition: Fl_Paged_Device.H:54
virtual void vertex(double x, double y)
see fl_vertex(double x, double y).
Definition: fl_vertex.cxx:120
utility header to pull drawing functions together
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:769
virtual void yxline(int x, int y, int y1)
see fl_yxline(int x, int y, int y1).
Definition: fl_rect.cxx:280
A virtual class subclassed for each graphics driver FLTK uses.
Definition: Fl_Device.H:108
virtual void push_no_clip()
see fl_push_no_clip().
Definition: fl_rect.cxx:605
virtual void circle(double x, double y, double r)
see fl_circle(double x, double y, double r).
Definition: fl_vertex.cxx:253
virtual void arc(double x, double y, double r, double start, double end)
see fl_arc(double x, double y, double r, double start, double end).
Definition: fl_arc.cxx:46
virtual void pie(int x, int y, int w, int h, double a1, double a2)
see fl_pie(int x, int y, int w, int h, double a1, double a2).
Definition: fl_arci.cxx:85
The Fl_Bitmap class supports caching and drawing of mono-color (bitmap) images.
Definition: Fl_Bitmap.H:42
void draw(const char *s, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
Definition: Fl_PostScript.H:196
virtual void line(int x, int y, int x1, int y1)
see fl_line(int x, int y, int x1, int y1).
Definition: fl_rect.cxx:349
virtual void translate(int x, int y)
Translates the current graphics origin accounting for the current rotation.
Definition: Fl_Paged_Device.cxx:247
A4 format.
Definition: Fl_Paged_Device.H:59
void end_complex_polygon()
see fl_end_complex_polygon().
Definition: Fl_PostScript.H:188
virtual void rectf(int x, int y, int w, int h)
see fl_rectf(int x, int y, int w, int h).
Definition: fl_rect.cxx:189
To send graphical output to a PostScript file.
Definition: Fl_PostScript.H:216
virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H).
Definition: fl_rect.cxx:651
virtual void end_polygon()
see fl_end_polygon().
Definition: fl_vertex.cxx:174
virtual void push_clip(int x, int y, int w, int h)
see fl_push_clip(int x, int y, int w, int h).
Definition: fl_rect.cxx:568
virtual int start_page(void)
Starts a new printed page.
Definition: Fl_Paged_Device.cxx:168
virtual int end_page(void)
To be called at the end of each page.
Definition: Fl_Paged_Device.cxx:233
virtual int printable_rect(int *w, int *h)
Computes the width and height of the printable area of the page.
Definition: Fl_Paged_Device.cxx:178
Portrait orientation.
Definition: Fl_Paged_Device.H:91
virtual void end_points()
see fl_end_points().
Definition: fl_vertex.cxx:124
unsigned char uchar
unsigned char
Definition: fl_types.h:39
Fl_Graphics_Driver * driver()
Returns the graphics driver of this drawing surface.
Definition: Fl_Device.H:511