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>
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 63a887d..074f083 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 @@
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 @@
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 @@
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;
}