summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-25 10:14:28 +0000
committerManolo Gouy <Manolo>2016-02-25 10:14:28 +0000
commit31793cbdba8e318350c5ed11b06d5a678eb15608 (patch)
tree6663410ff80abfa841ebf30a9a7f75bffeb730ac /src/drivers/GDI
parente24f3f79a334a501c9a239b32fe465981a8c3aab (diff)
Remove the global variable fl_mask_bitmap - put it in the graphics driver's virtual API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.h4
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
index d49df4e90..32c17d1b9 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.h
@@ -38,7 +38,11 @@ protected:
HDC gc_;
int numcount;
int counts[20];
+ uchar **mask_bitmap_;
+ uchar **mask_bitmap() {return mask_bitmap_;}
+ void mask_bitmap(uchar **value) { mask_bitmap_ = value; }
public:
+ Fl_GDI_Graphics_Driver() {mask_bitmap_ = NULL;}
static const char *class_id;
const char *class_name() {return class_id;};
virtual int has_feature(driver_feature mask) { return mask & NATIVE; }
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index 5ce2c5822..dca25ef8d 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -627,18 +627,17 @@ void Fl_GDI_Printer_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP
}
}
-extern uchar **fl_mask_bitmap;
fl_uintptr_t Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const char *const*data) {
Fl_Offscreen id;
id = fl_create_offscreen(w, h);
fl_begin_offscreen(id);
uchar *bitmap = 0;
- fl_mask_bitmap = &bitmap;
+ 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;
- fl_mask_bitmap = 0;
+ mask_bitmap(0);
if (bitmap) {
img->mask_ = (fl_uintptr_t)fl_create_bitmask(w, h, bitmap);
delete[] bitmap;