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/fpdfdoc/cpdf_annot.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/fpdfdoc/cpdf_annot.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_annot.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index c74965c3e7..cc70a3087c 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -485,11 +485,12 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, graph_state.m_DashArray[0] = graph_state.m_DashArray[1] = 3 * 1.0f; } } + CFX_FloatRect rect = GetRect(); + rect.Deflate(width / 2, width / 2); CFX_PathData path; - width /= 2; - path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, - rect.top - width); + path.AppendRect(rect); + int fill_type = 0; if (pOptions && (pOptions->HasFlag(RENDER_NOPATHSMOOTH))) fill_type |= FXFILL_NOPATHSMOOTH; |