summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.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_streamcontentparser.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_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index b8c9c4c6af..d8e1c1e15d 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1445,8 +1445,7 @@ void CPDF_StreamContentParser::AddPathPoint(FX_FLOAT x,
m_PathStartY = y;
if (m_PathPointCount &&
m_pPathPoints[m_PathPointCount - 1].IsTypeAndOpen(FXPT_TYPE::MoveTo)) {
- m_pPathPoints[m_PathPointCount - 1].m_PointX = x;
- m_pPathPoints[m_PathPointCount - 1].m_PointY = y;
+ m_pPathPoints[m_PathPointCount - 1].m_Point = CFX_PointF(x, y);
return;
}
} else if (m_PathPointCount == 0) {
@@ -1466,8 +1465,7 @@ void CPDF_StreamContentParser::AddPathPoint(FX_FLOAT x,
}
m_pPathPoints[m_PathPointCount - 1].m_Type = type;
m_pPathPoints[m_PathPointCount - 1].m_CloseFigure = close;
- m_pPathPoints[m_PathPointCount - 1].m_PointX = x;
- m_pPathPoints[m_PathPointCount - 1].m_PointY = y;
+ m_pPathPoints[m_PathPointCount - 1].m_Point = CFX_PointF(x, y);
}
void CPDF_StreamContentParser::AddPathObject(int FillType, bool bStroke) {
@@ -1491,8 +1489,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, bool bStroke) {
CPDF_Path Path;
for (int i = 0; i < PathPointCount; i++) {
FX_PATHPOINT& point = m_pPathPoints[i];
- Path.AppendPoint(point.m_PointX, point.m_PointY, point.m_Type,
- point.m_CloseFigure);
+ Path.AppendPoint(point.m_Point, point.m_Type, point.m_CloseFigure);
}
CFX_Matrix matrix = m_pCurStates->m_CTM;