diff options
Diffstat (limited to 'src/drivers/WinAPI')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 7c57d08f2..eb437b965 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -20,7 +20,7 @@ #include "../GDI/Fl_Font.H" #include <FL/Fl.H> #include <FL/platform.H> -#include <FL/Fl_Graphics_Driver.H> +#include "../GDI/Fl_GDI_Graphics_Driver.H" #include <FL/Fl_RGB_Image.H> #include <FL/fl_ask.H> #include <stdio.h> @@ -499,14 +499,14 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle( { float s = Fl_Surface_Device::surface()->driver()->scale(); int ws, hs; - if (int(s) == s) { ws = int(w * s); hs = int(h * s);} + if (int(s) == s) { ws = w * int(s); hs = h * int(s);} else { - ws = int((w+1) * s); // approximates what Fl_Graphics_Driver::cache_size() does - hs = int((h+1) * s); + ws = Fl_GDI_Graphics_Driver::floor(w+1, s); // approximates what Fl_Graphics_Driver::cache_size() does + hs = Fl_GDI_Graphics_Driver::floor(h+1, s); if (ws < 1) ws = 1; if (hs < 1) hs = 1; } - return read_win_rectangle_unscaled(int(X*s), int(Y*s), ws, hs, win); + return read_win_rectangle_unscaled(Fl_GDI_Graphics_Driver::floor(X, s), Fl_GDI_Graphics_Driver::floor(Y, s), ws, hs, win); } Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y, int w, int h, Fl_Window *win) |
