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_clippath.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_clippath.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_clippath.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_clippath.cpp b/core/fpdfapi/page/cpdf_clippath.cpp index cfcd9a1e64..714b56bff3 100644 --- a/core/fpdfapi/page/cpdf_clippath.cpp +++ b/core/fpdfapi/page/cpdf_clippath.cpp @@ -84,8 +84,9 @@ void CPDF_ClipPath::AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge) { if (!pData->m_PathAndTypeList.empty() && bAutoMerge) { const CPDF_Path& old_path = pData->m_PathAndTypeList.back().first; if (old_path.IsRect()) { - CFX_FloatRect old_rect(old_path.GetPointX(0), old_path.GetPointY(0), - old_path.GetPointX(2), old_path.GetPointY(2)); + CFX_PointF point0 = old_path.GetPoint(0); + CFX_PointF point2 = old_path.GetPoint(2); + CFX_FloatRect old_rect(point0.x, point0.y, point2.x, point2.y); CFX_FloatRect new_rect = path.GetBoundingBox(); if (old_rect.Contains(new_rect)) pData->m_PathAndTypeList.pop_back(); |