diff options
Diffstat (limited to 'FL/win32.H')
| -rw-r--r-- | FL/win32.H | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/FL/win32.H b/FL/win32.H index 657a66d9f..3707f81f7 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -3,7 +3,7 @@ // // WIN32 header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2012 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -132,15 +132,17 @@ extern FL_EXPORT HDC fl_makeDC(HBITMAP); // off-screen pixmaps: create, destroy, draw into, copy to window typedef HBITMAP Fl_Offscreen; #define fl_create_offscreen(w, h) \ - CreateCompatibleBitmap( (fl_gc ? fl_gc : fl_GetDC(0) ) , w, h) + CreateCompatibleBitmap( (fl_graphics_driver->get_gc() ? (HDC)fl_graphics_driver->get_gc() : fl_GetDC(0) ) , w, h) # define fl_begin_offscreen(b) \ - HDC _sgc=fl_gc; Window _sw=fl_window; \ - Fl_Surface_Device *_ss = Fl_Surface_Device::surface(); Fl_Display_Device::display_device()->set_current(); \ - fl_gc=fl_makeDC(b); int _savedc = SaveDC(fl_gc); fl_window=(HWND)b; fl_push_no_clip() + void* _sgc=fl_graphics_driver->get_gc(); Window _sw=fl_window; \ + Fl_Surface_Device *_ss = Fl_Surface_Device::surface(); \ +HDC _tmp_gc = fl_makeDC(b); int _savedc = SaveDC(_tmp_gc); \ +Fl_Display_Device::display_device()->set_current(); \ + fl_graphics_driver->set_gc(_tmp_gc); fl_window=(HWND)b; fl_push_no_clip() # define fl_end_offscreen() \ - fl_pop_clip(); RestoreDC(fl_gc, _savedc); DeleteDC(fl_gc); _ss->set_current(); fl_window=_sw; fl_gc = _sgc + fl_pop_clip(); RestoreDC((HDC)fl_graphics_driver->get_gc(), _savedc); DeleteDC((HDC)fl_graphics_driver->get_gc()); _ss->set_current(); fl_window=_sw; fl_graphics_driver->set_gc(_sgc); FL_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int srcx,int srcy); |
