summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentparser.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-02-22 19:56:15 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 01:17:40 +0000
commitb147e07ee36be10ca0796a6566be107077c21a03 (patch)
tree637b1b206000a88fb3e198f648e86a9ee5178f1b /core/fpdfapi/page/cpdf_contentparser.cpp
parente3f237740fd8bea50b4a6f37f56455dfa0328546 (diff)
downloadpdfium-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_contentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp
index 7f00eabb86..7ceb509348 100644
--- a/core/fpdfapi/page/cpdf_contentparser.cpp
+++ b/core/fpdfapi/page/cpdf_contentparser.cpp
@@ -203,8 +203,10 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause) {
CPDF_Path ClipPath = pObj->m_ClipPath.GetPath(0);
if (!ClipPath.IsRect() || pObj->IsShading())
continue;
- CFX_FloatRect old_rect(ClipPath.GetPointX(0), ClipPath.GetPointY(0),
- ClipPath.GetPointX(2), ClipPath.GetPointY(2));
+
+ CFX_PointF point0 = ClipPath.GetPoint(0);
+ CFX_PointF point2 = ClipPath.GetPoint(2);
+ CFX_FloatRect old_rect(point0.x, point0.y, point2.x, point2.y);
CFX_FloatRect obj_rect(pObj->m_Left, pObj->m_Bottom, pObj->m_Right,
pObj->m_Top);
if (old_rect.Contains(obj_rect))