summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-07 09:33:17 +0000
committerManolo Gouy <Manolo>2017-07-07 09:33:17 +0000
commit23e3535257790d0a2139e8be9ba02008d624ba65 (patch)
tree7053b9ebb46392ed85c5ea7aafd84f1073484822 /src/drivers/GDI
parent90f2bba62bcabe604d358b68795cdc365b5bce80 (diff)
WIN32 HiDPI support: fix scaling support for Fl_Copy_Surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12295 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
index e3d43664c..1a1152de5 100644
--- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
@@ -62,12 +62,11 @@ Fl_GDI_Copy_Surface_Driver::Fl_GDI_Copy_Surface_Driver(int w, int h) : Fl_Copy_S
// Global display scaling factor: 1, 1.25, 1.5, 1.75, etc...
#ifdef FLTK_HIDPI_SUPPORT
float scaling = Fl_Graphics_Driver::default_driver().scale();
- factorw *= scaling;
- factorh *= scaling;
#else
float scaling = ((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor(0);
#endif
- RECT rect; rect.left = 0; rect.top = 0; rect.right = (LONG)((w/scaling) * factorw); rect.bottom = (LONG)((h/scaling) * factorh);
+ driver()->scale(scaling);
+ RECT rect; rect.left = 0; rect.top = 0; rect.right = (LONG)((w*scaling) * factorw); rect.bottom = (LONG)((h*scaling) * factorh);
gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL);
if (gc != NULL) {
SetTextAlign(gc, TA_BASELINE|TA_LEFT);