diff options
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 52ccf8709..ad3691859 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -357,10 +357,9 @@ RECT GetClientRect(HWND hwnd) noexcept { #if defined(USE_D2D) D2D1_SIZE_U GetSizeUFromRect(const RECT &rc, const int scaleFactor) noexcept { - const long width = rc.right - rc.left; - const long height = rc.bottom - rc.top; - const UINT32 scaledWidth = width * scaleFactor; - const UINT32 scaledHeight = height * scaleFactor; + const SIZE size = SizeOfRect(rc); + const UINT32 scaledWidth = size.cx * scaleFactor; + const UINT32 scaledHeight = size.cy * scaleFactor; return D2D1::SizeU(scaledWidth, scaledHeight); } |