diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-02-22 19:56:15 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-23 01:17:40 +0000 |
commit | b147e07ee36be10ca0796a6566be107077c21a03 (patch) | |
tree | 637b1b206000a88fb3e198f648e86a9ee5178f1b /core/fpdfapi/page/cpdf_path.cpp | |
parent | e3f237740fd8bea50b4a6f37f56455dfa0328546 (diff) | |
download | pdfium-b147e07ee36be10ca0796a6566be107077c21a03.tar.xz |
Convert point x,y into CFX_PointF
This Cl converts the PointX,PointY pairs into a CFX_PointF.
Change-Id: I46897832077c317a5bffb4e568550705decbc40c
Reviewed-on: https://pdfium-review.googlesource.com/2821
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_path.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_path.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/core/fpdfapi/page/cpdf_path.cpp b/core/fpdfapi/page/cpdf_path.cpp index a95ce1e5bc..ddc6bbd1d6 100644 --- a/core/fpdfapi/page/cpdf_path.cpp +++ b/core/fpdfapi/page/cpdf_path.cpp @@ -20,12 +20,8 @@ void CPDF_Path::ClosePath() { m_Ref.GetPrivateCopy()->ClosePath(); } -FX_FLOAT CPDF_Path::GetPointX(int index) const { - return m_Ref.GetObject()->GetPointX(index); -} - -FX_FLOAT CPDF_Path::GetPointY(int index) const { - return m_Ref.GetObject()->GetPointY(index); +CFX_PointF CPDF_Path::GetPoint(int index) const { + return m_Ref.GetObject()->GetPoint(index); } CFX_FloatRect CPDF_Path::GetBoundingBox() const { @@ -60,11 +56,10 @@ void CPDF_Path::AppendRect(FX_FLOAT left, m_Ref.GetPrivateCopy()->AppendRect(left, bottom, right, top); } -void CPDF_Path::AppendPoint(FX_FLOAT x, - FX_FLOAT y, +void CPDF_Path::AppendPoint(const CFX_PointF& point, FXPT_TYPE type, bool close) { CFX_PathData data; - data.AppendPoint(x, y, type, close); + data.AppendPoint(point, type, close); Append(&data, nullptr); } |