diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-15 11:07:32 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-15 17:47:57 +0000 |
commit | e4602321f3175fa5addb6761d0e94f5c2fc93d0c (patch) | |
tree | 6671774659645fad6d9ce55a5910b4665a25094f /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | |
parent | eb55885e9a9eec670ed98cbd12dc96d63e6a6623 (diff) | |
download | pdfium-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 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp index a8368f4352..7778408531 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp @@ -70,15 +70,14 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView, CFX_FloatRect rcFocus = pFormFiller->GetFocusBox(pPageView); if (!rcFocus.IsEmpty()) { CFX_PathData path; - path.SetPointCount(5); - path.SetPoint(0, rcFocus.left, rcFocus.top, FXPT_TYPE::MoveTo, false); - path.SetPoint(1, rcFocus.left, rcFocus.bottom, FXPT_TYPE::LineTo, - false); - path.SetPoint(2, rcFocus.right, rcFocus.bottom, FXPT_TYPE::LineTo, - false); - path.SetPoint(3, rcFocus.right, rcFocus.top, FXPT_TYPE::LineTo, - false); - path.SetPoint(4, rcFocus.left, rcFocus.top, FXPT_TYPE::LineTo, false); + path.AppendPoint(rcFocus.left, rcFocus.top, FXPT_TYPE::MoveTo, false); + path.AppendPoint(rcFocus.left, rcFocus.bottom, FXPT_TYPE::LineTo, + false); + path.AppendPoint(rcFocus.right, rcFocus.bottom, FXPT_TYPE::LineTo, + false); + path.AppendPoint(rcFocus.right, rcFocus.top, FXPT_TYPE::LineTo, + false); + path.AppendPoint(rcFocus.left, rcFocus.top, FXPT_TYPE::LineTo, false); CFX_GraphStateData gsd; gsd.SetDashCount(1); |