summaryrefslogtreecommitdiff
path: root/core/fxge/win32/fx_win32_print.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-15 11:07:32 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-15 17:47:57 +0000
commite4602321f3175fa5addb6761d0e94f5c2fc93d0c (patch)
tree6671774659645fad6d9ce55a5910b4665a25094f /core/fxge/win32/fx_win32_print.cpp
parenteb55885e9a9eec670ed98cbd12dc96d63e6a6623 (diff)
downloadpdfium-e4602321f3175fa5addb6761d0e94f5c2fc93d0c.tar.xz
Cleanup CFX_PathData.
This CL replaces the array of path points with a vector. Cleaning up the usage as required. Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238 Reviewed-on: https://pdfium-review.googlesource.com/2710 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
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);
}