From b147e07ee36be10ca0796a6566be107077c21a03 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 22 Feb 2017 19:56:15 -0500 Subject: Convert point x,y into CFX_PointF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña --- fpdfsdk/pdfwindow/PWL_Edit.cpp | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_Edit.cpp') diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 5c22d21940..4aa3d927d7 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -326,13 +326,17 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, for (int32_t i = 0; i < nCharArray - 1; i++) { path.AppendPoint( - rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), - rcClient.bottom, FXPT_TYPE::MoveTo, false); + CFX_PointF( + rcClient.left + + ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), + rcClient.bottom), + FXPT_TYPE::MoveTo, false); path.AppendPoint( - rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), - rcClient.top, FXPT_TYPE::LineTo, false); + CFX_PointF( + rcClient.left + + ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), + rcClient.top), + FXPT_TYPE::LineTo, false); } if (!path.GetPoints().empty()) { pDevice->DrawPath( @@ -354,13 +358,17 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_PathData path; for (int32_t i = 0; i < nCharArray - 1; i++) { path.AppendPoint( - rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), - rcClient.bottom, FXPT_TYPE::MoveTo, false); + CFX_PointF( + rcClient.left + + ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), + rcClient.bottom), + FXPT_TYPE::MoveTo, false); path.AppendPoint( - rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), - rcClient.top, FXPT_TYPE::LineTo, false); + CFX_PointF( + rcClient.left + + ((rcClient.right - rcClient.left) / nCharArray) * (i + 1), + rcClient.top), + FXPT_TYPE::LineTo, false); } if (!path.GetPoints().empty()) { pDevice->DrawPath( -- cgit v1.2.3