From 79365f7e3d2d62138e79e4403d4959318776c139 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Tue, 7 Feb 2017 14:21:36 -0500 Subject: Use enum class for PathPoint types. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This hopefully makes it less confusing what the description of a point is. Currently we have defines for the types, which is confusing because a point can only be one of the three. And it is mixed up with whether the point is closing a figure or not. Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753 Reviewed-on: https://pdfium-review.googlesource.com/2552 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- fpdfsdk/pdfwindow/PWL_ScrollBar.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_ScrollBar.cpp') diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp index 8a09ac6636..c7e6bbfa99 100644 --- a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp +++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp @@ -264,10 +264,10 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_PathData path; path.SetPointCount(4); - path.SetPoint(0, pt1.x, pt1.y, FXPT_MOVETO); - path.SetPoint(1, pt2.x, pt2.y, FXPT_LINETO); - path.SetPoint(2, pt3.x, pt3.y, FXPT_LINETO); - path.SetPoint(3, pt1.x, pt1.y, FXPT_LINETO); + path.SetPoint(0, pt1.x, pt1.y, FXPT_TYPE::MoveTo, false); + path.SetPoint(1, pt2.x, pt2.y, FXPT_TYPE::LineTo, false); + path.SetPoint(2, pt3.x, pt3.y, FXPT_TYPE::LineTo, false); + path.SetPoint(3, pt1.x, pt1.y, FXPT_TYPE::LineTo, false); pDevice->DrawPath(&path, pUser2Device, nullptr, CPWL_Utils::PWLColorToFXColor( @@ -288,10 +288,10 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_PathData path; path.SetPointCount(4); - path.SetPoint(0, pt1.x, pt1.y, FXPT_MOVETO); - path.SetPoint(1, pt2.x, pt2.y, FXPT_LINETO); - path.SetPoint(2, pt3.x, pt3.y, FXPT_LINETO); - path.SetPoint(3, pt1.x, pt1.y, FXPT_LINETO); + path.SetPoint(0, pt1.x, pt1.y, FXPT_TYPE::MoveTo, false); + path.SetPoint(1, pt2.x, pt2.y, FXPT_TYPE::LineTo, false); + path.SetPoint(2, pt3.x, pt3.y, FXPT_TYPE::LineTo, false); + path.SetPoint(3, pt1.x, pt1.y, FXPT_TYPE::LineTo, false); pDevice->DrawPath(&path, pUser2Device, nullptr, CPWL_Utils::PWLColorToFXColor( -- cgit v1.2.3