summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-03-11 16:05:20 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-03-11 16:05:32 +0100
commit569fec25e0454c4e4b98dcc383143a357ca50b55 (patch)
treec38048366a56a901a66465fdaca6628d0e03405a /src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
parentbd6c9854342094e2de8183aaab740804c1a6fc1f (diff)
Unification of scaled coordinate calculations in class Fl_Scalable_Graphics_Driver
Most coordinate calculations are done with the new inline function int Fl_Scalable_Graphics_Driver::floor(int coord) that is used by both the Windows and X11 platforms.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 09dd6fa45..3fe721907 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -261,13 +261,13 @@ HRGN Fl_GDI_Graphics_Driver::scale_region(HRGN r, float f, Fl_GDI_Graphics_Drive
}
RECT *rects = (RECT*)&(pdata->Buffer);
for (DWORD i = 0; i < pdata->rdh.nCount; i++) {
- int x = Fl_GDI_Graphics_Driver::floor(rects[i].left, f) + pt.x;
- int y = Fl_GDI_Graphics_Driver::floor(rects[i].top, f) + pt.y;
+ int x = Fl_Scalable_Graphics_Driver::floor(rects[i].left, f) + pt.x;
+ int y = Fl_Scalable_Graphics_Driver::floor(rects[i].top, f) + pt.y;
RECT R2;
R2.left = x;
R2.top = y;
- R2.right = Fl_GDI_Graphics_Driver::floor(rects[i].right, f) + pt.x - x + R2.left;
- R2.bottom = Fl_GDI_Graphics_Driver::floor(rects[i].bottom, f) + pt.y - y + R2.top;
+ R2.right = Fl_Scalable_Graphics_Driver::floor(rects[i].right, f) + pt.x - x + R2.left;
+ R2.bottom = Fl_Scalable_Graphics_Driver::floor(rects[i].bottom, f) + pt.y - y + R2.top;
rects[i] = R2;
}
r = ExtCreateRegion(NULL, size, pdata);