diff options
| author | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
| commit | 26049351e09d75bdf8b35273a76cf65202583fa7 (patch) | |
| tree | 010685555b9f83d071a14262e8ce346c7388f254 /src/Fl_win32.cxx | |
| parent | 0a280ce591046f6834f1233087a72fa6bdd97bad (diff) | |
Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index f26d639db..3ccfd3106 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -95,9 +95,11 @@ for async mode proper operation, not mentioning the side effects... */ -static Fl_GDI_Display fl_gdi_device; -FL_EXPORT Fl_Display *fl_display_device = (Fl_Display*)&fl_gdi_device; // does not change -FL_EXPORT Fl_Device *fl_device = (Fl_Device*)&fl_gdi_device; // the current target device of graphics operations +static Fl_GDI_Graphics_Driver fl_gdi_driver; +static Fl_Display_Device fl_gdi_display(&fl_gdi_driver); +FL_EXPORT Fl_Display_Device *fl_display_device = (Fl_Display_Device*)&fl_gdi_display; // does not change +FL_EXPORT Fl_Graphics_Driver *fl_device = (Fl_Graphics_Driver*)&fl_gdi_driver; // the current target driver of graphics operations +FL_EXPORT Fl_Surface_Device *fl_surface = (Fl_Surface_Device*)fl_display_device; // the current target surface of graphics operations // dynamic wsock dll handling api: #if defined(__CYGWIN__) && !defined(SOCKET) @@ -1925,7 +1927,7 @@ void fl_cleanup_dc_list(void) { // clean up the list } Fl_Region XRectangleRegion(int x, int y, int w, int h) { - if (Fl_Device::current()->type() < 256) return CreateRectRgn(x,y,x+w,y+h); + if (Fl_Surface_Device::surface()->type() == Fl_Display_Device::device_type) return CreateRectRgn(x,y,x+w,y+h); // because rotation may apply, the rectangle becomes a polygon in device coords POINT pt[4] = { {x, y}, {x + w, y}, {x + w, y + h}, {x, y + h} }; LPtoDP(fl_gc, pt, 4); |
