From fce1483eb82be85c1b95abfd1d9a486556bce0e3 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 12 Apr 2016 13:47:38 +0000 Subject: Rewrite fl_draw_pixmap.cxx under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11587 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx | 4 ++-- src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index 20405ea5d..66f51456c 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -37,6 +37,7 @@ #include #include "Fl_GDI_Graphics_Driver.H" +#include "../WinAPI/Fl_WinAPI_System_Driver.H" #include #include #include @@ -635,8 +636,7 @@ fl_uintptr_t Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const c uchar *bitmap = 0; Fl_Surface_Device::surface()->driver()->mask_bitmap(&bitmap); fl_draw_pixmap(data, 0, 0, FL_BLACK); - extern UINT win_pixmap_bg_color; // computed by fl_draw_pixmap() - img->pixmap_bg_color = win_pixmap_bg_color; + img->pixmap_bg_color = Fl_WinAPI_System_Driver::win_pixmap_bg_color; // computed by fl_draw_pixmap() Fl_Surface_Device::surface()->driver()->mask_bitmap(0); if (bitmap) { img->mask_ = (fl_uintptr_t)fl_create_bitmask(w, h, bitmap); diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index 2bbc81316..445af30ef 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -42,6 +42,7 @@ class Fl_WinAPI_System_Driver : public Fl_System_Driver { public: + static unsigned win_pixmap_bg_color; // the RGB() of the pixmap background color virtual void warning(const char *format, va_list args); virtual void error(const char *format, va_list args); virtual void fatal(const char *format, va_list args); @@ -93,6 +94,9 @@ public: // this one is implemented in Fl_win32.cxx virtual void* thread_message(); virtual int file_type(const char *filename); + virtual int pixmap_extra_transparent_processing() {return 1;} + // this one is implemented in fl_draw_pixmap.cxx + virtual void make_unused_color(unsigned char &r, unsigned char &g, unsigned char &b); }; #endif // FL_WINAPI_SYSTEM_DRIVER_H -- cgit v1.2.3