summaryrefslogtreecommitdiff
path: root/core/fxge/win32/fx_win32_print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/win32/fx_win32_print.cpp')
-rw-r--r--core/fxge/win32/fx_win32_print.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index a2ea82a94e..3b0c6969f9 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -346,12 +346,13 @@ CPSPrinterDriver::CPSPrinterDriver(HDC hDC, int pslevel, bool bCmykOutput)
ret = ::GetRegionData(hRgn, ret, pData);
if (ret) {
CFX_PathData path;
- path.AllocPointCount(pData->rdh.nCount * 5);
for (uint32_t i = 0; i < pData->rdh.nCount; i++) {
RECT* pRect =
reinterpret_cast<RECT*>(pData->Buffer + pData->rdh.nRgnSize * i);
- path.AppendRect((FX_FLOAT)pRect->left, (FX_FLOAT)pRect->bottom,
- (FX_FLOAT)pRect->right, (FX_FLOAT)pRect->top);
+ path.AppendRect(static_cast<FX_FLOAT>(pRect->left),
+ static_cast<FX_FLOAT>(pRect->bottom),
+ static_cast<FX_FLOAT>(pRect->right),
+ static_cast<FX_FLOAT>(pRect->top));
}
m_PSRenderer.SetClip_PathFill(&path, nullptr, FXFILL_WINDING);
}