From 1fdf15d8ebd443c3ffc736a21944e091f99c07ce Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 26 Aug 2017 14:10:56 +0000 Subject: WIN32: allow to change the active drawing surface between Fl_Display_Device and Fl_Image_Surface and keep the clipping region correct. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12401 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx') diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 0f80c0ecd..73d9498d2 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -94,7 +94,7 @@ char Fl_GDI_Graphics_Driver::can_do_alpha_blending() { } HDC fl_makeDC(HBITMAP bitmap) { - HDC new_gc = CreateCompatibleDC((HDC)fl_graphics_driver->gc()); + HDC new_gc = CreateCompatibleDC((HDC)Fl_Graphics_Driver::default_driver().gc()); SetTextAlign(new_gc, TA_BASELINE|TA_LEFT); SetBkMode(new_gc, TRANSPARENT); #if USE_COLORMAP @@ -282,6 +282,10 @@ Fl_Region Fl_GDI_Graphics_Driver::scale_clip(float f) { return (r == r2 ? NULL : (rstack[rstackptr] = r2, r)); } +void Fl_GDI_Graphics_Driver::set_current_() { + restore_clip(); +} + // // End of "$Id$". // -- cgit v1.2.3