diff options
Diffstat (limited to 'src/drivers/PostScript')
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript.cxx | 9 | ||||
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H | 13 | ||||
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript_image.cxx | 10 |
3 files changed, 18 insertions, 14 deletions
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index 4ce3f67b9..f5d8f8f11 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -145,12 +145,11 @@ Fl_PostScript_Graphics_Driver::Fl_PostScript_Graphics_Driver(void) //lang_level_ = 3; lang_level_ = 2; mask = 0; -#endif - ps_filename_ = NULL; - scale_x = scale_y = 1.; bg_r = bg_g = bg_b = 255; clip_ = NULL; - what = NONE; + scale_x = scale_y = 1.; +#endif + ps_filename_ = NULL; } /** \brief The destructor. */ @@ -1750,9 +1749,9 @@ Fl_EPS_File_Surface::Fl_EPS_File_Surface(int width, int height, FILE *eps, Fl_Co if (s != 1) { ps->clocale_printf("GR GR GS %f %f SC GS\n", s, s); } + Fl::get_color(background, ps->bg_r, ps->bg_g, ps->bg_b); #endif ps->scale_x = ps->scale_y = s; - Fl::get_color(background, ps->bg_r, ps->bg_g, ps->bg_b); } } diff --git a/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H b/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H index fef8ded71..904644f42 100644 --- a/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H +++ b/src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H @@ -1,7 +1,7 @@ // // Support for graphics output to PostScript file for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2022 by Bill Spitzak and others. +// Copyright 2010-2023 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -49,7 +49,6 @@ public: char *ps_filename_; int nPages; double pw_, ph_; - uchar bg_r, bg_g, bg_b; Fl_PostScript_Graphics_Driver(); ~Fl_PostScript_Graphics_Driver(); @@ -80,11 +79,13 @@ public: int not_clipped(int x, int y, int w, int h) FL_OVERRIDE; int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) FL_OVERRIDE; virtual int has_feature(driver_feature feature_mask) FL_OVERRIDE { return feature_mask & PRINTER; } +#if !FLTK_USE_CAIRO // draw image classes without caching them - void draw_rgb_bitmap_(Fl_Image *img,int XP, int YP, int WP, int HP, int cx, int cy); - void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; - void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; - void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb_bitmap_(Fl_Image *img,int XP, int YP, int WP, int HP, int cx, int cy); + void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_bitmap(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; + void draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy) FL_OVERRIDE; +#endif // !FLTK_USE_CAIRO }; #else // ! USE_PANGO diff --git a/src/drivers/PostScript/Fl_PostScript_image.cxx b/src/drivers/PostScript/Fl_PostScript_image.cxx index 64f9972bf..c78627727 100644 --- a/src/drivers/PostScript/Fl_PostScript_image.cxx +++ b/src/drivers/PostScript/Fl_PostScript_image.cxx @@ -1,7 +1,7 @@ // // Postscript image drawing implementation for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2022 by Bill Spitzak and others. +// Copyright 1998-2023 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -68,7 +68,9 @@ void Fl_PostScript_Graphics_Driver::draw_image(const uchar *data, int ix, int iy draw_image(draw_image_cb, &cb_data, ix, iy, iw, ih, abs(D)); } -#if USE_PANGO +#if USE_PANGO + +#if !FLTK_USE_CAIRO static void destroy_BGRA(void *data) { delete[] (uchar*)data; @@ -180,7 +182,9 @@ void Fl_PostScript_Graphics_Driver::draw_rgb_bitmap_(Fl_Image *img,int XP, int Y } } -#else // USE_PANGO +#endif // !FLTK_USE_CAIRO + +#else // ! USE_PANGO // // Implementation of the /ASCII85Encode PostScript filter |
