diff options
| author | Manolo Gouy <Manolo> | 2011-02-18 17:22:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-18 17:22:43 +0000 |
| commit | f5f0cf99084feba5545e8444abc6e61d1142a7c8 (patch) | |
| tree | 3071b29b37c9c11a35cb73b65e6d825ff5695832 /FL/Fl_PostScript.H | |
| parent | 199b32d9213584e232aee11d2a4d16a26f1d508d (diff) | |
Added scale(), translate(), and rotate() functions to the Fl_Graphics_Driver class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_PostScript.H')
| -rw-r--r-- | FL/Fl_PostScript.H | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index b03b67c06..61f7faecc 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -64,8 +64,8 @@ class Fl_PostScript_Graphics_Driver : public Fl_Graphics_Driver { public: static const char *class_id; + Fl_PostScript_Graphics_Driver(); #ifndef FL_DOXYGEN -public: enum SHAPE{NONE=0, LINE, LOOP, POLYGON, POINTS}; class Clip { @@ -115,12 +115,6 @@ class Clip { int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout); /* int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); */ - void draw(const char* s, int n, int x, int y) {transformed_draw(s,n,x,y); }; -#ifdef __APPLE__ - void draw(const char* s, int n, float x, float y) {transformed_draw(s,n,x,y); }; -#endif - void draw(int angle, const char *str, int n, int x, int y); - void rtl_draw(const char* s, int n, int x, int y); void transformed_draw(const char* s, int n, double x, double y); //precise text placing void transformed_draw(const char* s, double x, double y); int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); @@ -131,6 +125,21 @@ class Clip { enum Fl_Paged_Device::Page_Format page_format_; char *ps_filename_; + + void page_policy(int p); + int page_policy(){return page_policy_;}; + void close_command( int (*cmd)(FILE *)){close_cmd_=cmd;}; + FILE * file() {return output;}; + //void orientation (int o); + //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor + //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int x, int y, int w, int h); //eps constructor + void interpolate(int i){interpolate_=i;}; + int interpolate(){return interpolate_;} + + void page(double pw, double ph, int media = 0); + void page(int format); +#endif // FL_DOXYGEN + // implementation of drawing methods void color(Fl_Color c); void color(uchar r, uchar g, uchar b); @@ -181,34 +190,23 @@ class Clip { void gap(){gap_=1;}; void end_complex_polygon(){end_polygon();}; void transformed_vertex(double x, double y); - - void font(int face, int size); - double width(const char *, int); - void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); - int height(); - int descent(); - + void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0){draw_scaled_image(d,x,y,w,h,w,h,delta,ldelta);}; void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0){draw_scaled_image_mono(d,x,y,w,h,w,h,delta,ld);}; void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3){draw_scaled_image(call,data, x, y, w, h, w, h, delta);}; void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1){draw_scaled_image_mono(call, data, x, y, w, h, w, h, delta);}; -public: - void page_policy(int p); - int page_policy(){return page_policy_;}; - void close_command( int (*cmd)(FILE *)){close_cmd_=cmd;}; - FILE * file() {return output;}; - //void orientation (int o); - //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor - //Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int x, int y, int w, int h); //eps constructor - void interpolate(int i){interpolate_=i;}; - int interpolate(){return interpolate_;} - - void page(double pw, double ph, int media = 0); - void page(int format); - -#endif // FL_DOXYGEN - Fl_PostScript_Graphics_Driver(); + void draw(const char* s, int n, int x, int y) {transformed_draw(s,n,x,y); }; +#ifdef __APPLE__ + void draw(const char* s, int n, float x, float y) {transformed_draw(s,n,x,y); }; +#endif + void draw(int angle, const char *str, int n, int x, int y); + void rtl_draw(const char* s, int n, int x, int y); + void font(int face, int size); + double width(const char *, int); + void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); + int height(); + int descent(); void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy); void draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy); void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy); |
