summaryrefslogtreecommitdiff
path: root/src/Fl_Double_Window.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-09-16 16:02:00 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-09-16 16:02:00 +0000
commitb39938e5cc0ce645dde8b1a686811fe7e3164a50 (patch)
tree5982044416dc7b7245364b6d5357664565745785 /src/Fl_Double_Window.cxx
parent8238e057272f705784571f51d19bf4019c6d4acd (diff)
OK, I believe I fixed the transparency issues on WIN32. Please everyone, test the code on all machines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Double_Window.cxx')
-rw-r--r--src/Fl_Double_Window.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 4f87f0bc3..e648fa4ab 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -87,7 +87,6 @@ static fl_alpha_blend_func fl_alpha_blend = NULL;
* and finds the required function if so.
*/
char fl_can_do_alpha_blending() {
- return 0;
static char been_here = 0;
static char can_do = 0;
if (been_here) return can_do;
@@ -111,8 +110,16 @@ HDC fl_makeDC(HBITMAP bitmap) {
}
void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
- static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
+ HDC new_gc = CreateCompatibleDC(fl_gc);
+ int save = SaveDC(new_gc);
+ SelectObject(new_gc, bitmap);
+ BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
+ RestoreDC(new_gc, save);
+ DeleteDC(new_gc);
+}
+void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
+ static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
HDC new_gc = CreateCompatibleDC(fl_gc);
int save = SaveDC(new_gc);
SelectObject(new_gc, bitmap);