diff options
| author | Manolo Gouy <Manolo> | 2010-04-16 20:19:09 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-04-16 20:19:09 +0000 |
| commit | 913530758af63f00676c6746988aef8b35b02531 (patch) | |
| tree | d6b59be15047e3c2742158eb5063aca55ea94eba /src/Fl_Double_Window.cxx | |
| parent | 0f180e130639f1017e7ca6b668357304632c1a62 (diff) | |
Improved the hierarchy of Fl_Device subclasses to allow separation of platform-specific devices.
This introduces multiple inheritance.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Double_Window.cxx')
| -rw-r--r-- | src/Fl_Double_Window.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 89f838844..70462a2ab 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -28,6 +28,7 @@ #include <config.h> #include <FL/Fl.H> #include <FL/Fl_Double_Window.H> +#include <FL/Fl_Printer.H> #include <FL/x.H> #include <FL/fl_draw.H> @@ -148,8 +149,9 @@ void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int src SelectObject(new_gc, bitmap); BOOL alpha_ok = 0; // first try to alpha blend - int to_display = Fl_Device::current()->type() < 256; // true iff display output - if ( (!to_display) || fl_can_do_alpha_blending()) // if not on display, always try alpha_blend + // if to printer, always try alpha_blend + int to_display = Fl_Device::current()->type() == Fl_Display_Device::device_type; // true iff display output + if ( (to_display && fl_can_do_alpha_blending()) || Fl_Device::current()->type() == Fl_Printer::device_type) alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc); // if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1 if (!alpha_ok) |
