summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-24 14:52:36 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-24 14:52:47 +0100
commitbef46b5cb82464713a117b9bdb920735d1b7de37 (patch)
treee645da2fdd342a8a8a41c90b54b2e96e29d849a0 /src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
parent9f84fd05e8090c3b7554c965d15ac5c41a0d4852 (diff)
Improve precision of GUI scaling for Windows platform.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
index 7117c6c49..b73c72e8d 100644
--- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
@@ -75,7 +75,7 @@ Fl_GDI_Copy_Surface_Driver::~Fl_GDI_Copy_Surface_Driver() {
SetClipboardData (CF_ENHMETAFILE, hmf);
// then put a BITMAP version of the graphics in the clipboard
float scaling = driver()->scale();
- int W = int(width * scaling), H = int(height * scaling);
+ int W = Fl_GDI_Graphics_Driver::floor(width, scaling), H = Fl_GDI_Graphics_Driver::floor(height, scaling);
RECT rect = {0, 0, W, H};
Fl_Image_Surface *surf = new Fl_Image_Surface(W, H);
Fl_Surface_Device::push_current(surf);