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 /fpdfsdk/fpdfeditpath.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 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpath.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp index 63a887dc85..074f083bb1 100644 --- a/fpdfsdk/fpdfeditpath.cpp +++ b/fpdfsdk/fpdfeditpath.cpp @@ -10,7 +10,7 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y) { CPDF_PathObject* pPathObj = new CPDF_PathObject; - pPathObj->m_Path.AppendPoint(x, y, FXPT_TYPE::MoveTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false); pPathObj->DefaultStates(); return pPathObj; } @@ -71,7 +71,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_MoveTo(FPDF_PAGEOBJECT path, float x, float y) { return false; auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); - pPathObj->m_Path.AppendPoint(x, y, FXPT_TYPE::MoveTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false); return true; } @@ -80,7 +80,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_LineTo(FPDF_PAGEOBJECT path, float x, float y) { return false; auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); - pPathObj->m_Path.AppendPoint(x, y, FXPT_TYPE::LineTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::LineTo, false); return true; } @@ -95,9 +95,9 @@ DLLEXPORT FPDF_BOOL FPDFPath_BezierTo(FPDF_PAGEOBJECT path, return false; auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); - pPathObj->m_Path.AppendPoint(x1, y1, FXPT_TYPE::BezierTo, false); - pPathObj->m_Path.AppendPoint(x2, y2, FXPT_TYPE::BezierTo, false); - pPathObj->m_Path.AppendPoint(x3, y3, FXPT_TYPE::BezierTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x1, y1), FXPT_TYPE::BezierTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x2, y2), FXPT_TYPE::BezierTo, false); + pPathObj->m_Path.AppendPoint(CFX_PointF(x3, y3), FXPT_TYPE::BezierTo, false); return true; } |