diff options
author | Lei Zhang <thestig@chromium.org> | 2018-03-15 19:27:17 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-15 19:27:17 +0000 |
commit | 7d75650672a848428aaadb603b2814d33dfb479f (patch) | |
tree | 508d0c992231aa1a5faad16d7ebe1bf1c44c4d78 /core/fxge/cfx_renderdevice.cpp | |
parent | 35841fa4e3dbf8f9146f78def048c4a287894a8a (diff) | |
download | pdfium-7d75650672a848428aaadb603b2814d33dfb479f.tar.xz |
Add a CFX_PathData::AppendRect() variant.chromium/3372
One that takes a CFX_FloatRect instead of LBRT floats. Use it where
appropriate.
Change-Id: I8ba19e86c61c91d8b4ef685b5cb65c8fb717f013
Reviewed-on: https://pdfium-review.googlesource.com/28581
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/cfx_renderdevice.cpp')
-rw-r--r-- | core/fxge/cfx_renderdevice.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp index 6c7e896b01..2e279d636f 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -1134,8 +1134,7 @@ void CFX_RenderDevice::DrawFillRect(const CFX_Matrix* pUser2Device, const CFX_FloatRect& rect, const FX_COLORREF& color) { CFX_PathData path; - CFX_FloatRect rcTemp(rect); - path.AppendRect(rcTemp.left, rcTemp.bottom, rcTemp.right, rcTemp.top); + path.AppendRect(rect); DrawPath(&path, pUser2Device, nullptr, color, 0, FXFILL_WINDING); } @@ -1155,13 +1154,11 @@ void CFX_RenderDevice::DrawStrokeRect(const CFX_Matrix* pUser2Device, const CFX_FloatRect& rect, const FX_COLORREF& color, float fWidth) { - CFX_PathData path; - CFX_FloatRect rcTemp(rect); - path.AppendRect(rcTemp.left, rcTemp.bottom, rcTemp.right, rcTemp.top); - CFX_GraphStateData gsd; gsd.m_LineWidth = fWidth; + CFX_PathData path; + path.AppendRect(rect); DrawPath(&path, pUser2Device, &gsd, 0, color, FXFILL_ALTERNATE); } |