From f6cb583e27ffd6046da7a28edc35fc8001ea9415 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 12 Mar 2012 11:55:50 +0000 Subject: Replaced fl_copy_offscreen_with_alpha() by Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and fl_create_offscreen_with_alpha() by Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Double_Window.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_Double_Window.cxx') diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 0e2919d7a..bec91f1c1 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -167,7 +167,7 @@ static void fl_copy_offscreen_to_display(int x,int y,int w,int h,HBITMAP bitmap, DeleteDC(new_gc); } -void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) { +void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) { HDC new_gc = CreateCompatibleDC(fl_gc); int save = SaveDC(new_gc); SelectObject(new_gc, bitmap); @@ -176,7 +176,7 @@ void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int src // if to printer, always try alpha_blend int to_display = Fl_Surface_Device::surface()->class_name() == Fl_Display_Device::class_id; // true iff display output if ( (to_display && fl_can_do_alpha_blending()) || Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { - alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc); + if (fl_alpha_blend) 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) { @@ -194,7 +194,7 @@ char fl_can_do_alpha_blending() { return 1; } -Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h) { +Fl_Offscreen Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(int w, int h) { void *data = calloc(w*h,4); CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB(); CGContextRef ctx = CGBitmapContextCreate( -- cgit v1.2.3