From 15e3f4b2d2fca4e501e13a2a303880013955dfcd Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 18 Apr 2018 15:03:51 +0000 Subject: Simplify the implementation of printing of Fl_Pixmap images under Windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Graphics_Driver.H | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'FL/Fl_Graphics_Driver.H') diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index c7ba46f15..8322c348f 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -86,6 +86,7 @@ class FL_EXPORT Fl_Graphics_Driver { friend void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D); friend void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D); friend void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy); + friend int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg); friend FL_EXPORT void gl_start(); friend FL_EXPORT void gl_finish(); friend FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *array); @@ -137,6 +138,8 @@ private: virtual void draw_fixed(Fl_Pixmap *pxm,int XP, int YP, int WP, int HP, int cx, int cy) {} virtual void draw_fixed(Fl_Bitmap *bm,int XP, int YP, int WP, int HP, int cx, int cy) {} virtual void draw_fixed(Fl_RGB_Image *rgb,int XP, int YP, int WP, int HP, int cx, int cy) {} + // the default implementation of make_unused_color_() is most probably enough + virtual void make_unused_color_(unsigned char &r, unsigned char &g, unsigned char &b) {} // some platforms may need to reimplement this virtual void set_current_(); protected: @@ -259,13 +262,12 @@ protected: pwidth = &(rgb->cache_w_); pheight = &(rgb->cache_h_); } - /** Accessor to a private member variable of Fl_Pixmap */ - static Fl_Color* pixmap_bg_color(Fl_Pixmap *pm) {return &(pm->pixmap_bg_color);} /** For internal library use only */ static void draw_empty(Fl_Image* img, int X, int Y) {img->draw_empty(X, Y);} Fl_Graphics_Driver(); void cache_size(Fl_Image *img, int &width, int &height); + static unsigned need_pixmap_bg_color; public: virtual ~Fl_Graphics_Driver() {} ///< Destructor static Fl_Graphics_Driver &default_driver(); -- cgit v1.2.3