diff options
| author | Manolo Gouy <Manolo> | 2016-02-27 13:52:27 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-02-27 13:52:27 +0000 |
| commit | 0b406baa0f05d8b829d2c35b10c8450e7628be53 (patch) | |
| tree | 62d91890f7194e00ea9f40e89f640c7c013c7b45 /src/drivers/GDI | |
| parent | 5d24872dc40e1047cea6337d8823718ac2acd575 (diff) | |
Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index 4a1c6e007..f750e1785 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -173,7 +173,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, int blocking = h; {int size = linesize*h; // when printing, don't limit buffer size not to get a crash in StretchDIBits - if (size > MAXBUFFER && Fl_Surface_Device::surface() == Fl_Display_Device::display_device()) { + if (size > MAXBUFFER && !fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) { size = MAXBUFFER; blocking = MAXBUFFER/linesize; } @@ -251,7 +251,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, } } } - if (Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) { + if (fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) { // if print context, device and logical units are not equal, so SetDIBitsToDevice // does not do the expected job, whereas StretchDIBits does it. StretchDIBits(gc, x, y+j-k, w, k, 0, 0, w, k, @@ -633,11 +633,11 @@ fl_uintptr_t Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const c id = fl_create_offscreen(w, h); fl_begin_offscreen(id); uchar *bitmap = 0; - mask_bitmap(&bitmap); + fl_graphics_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; - mask_bitmap(0); + fl_graphics_driver->mask_bitmap(0); if (bitmap) { img->mask_ = (fl_uintptr_t)fl_create_bitmask(w, h, bitmap); delete[] bitmap; |
