From 238c6bf3c4c44e1edcae44a1f89c543ab6a28737 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 17 Jan 2018 19:08:16 +0000 Subject: Rename box arc methods for clarity This CL renames the CXFA_Box arc methods to make it clear they aren't just for handling arcs. Change-Id: Id2fa16c572f9529d6a13a921d59c2dcbf8a50b7a Reviewed-on: https://pdfium-review.googlesource.com/23112 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_box.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp index 3aacd90b09..4ac16cdafd 100644 --- a/xfa/fxfa/parser/cxfa_box.cpp +++ b/xfa/fxfa/parser/cxfa_box.cpp @@ -50,10 +50,10 @@ std::pair Style3D( return {XFA_AttributeEnum::Unknown, stroke}; } -void XFA_BOX_GetPath_Arc(CXFA_Box* box, - CFX_RectF rtDraw, - CXFA_GEPath& fillPath, - bool forceRound) { +void XFA_BOX_GetPath_ArcOrRounded(CXFA_Box* box, + CFX_RectF rtDraw, + CXFA_GEPath& fillPath, + bool forceRound) { float a, b; a = rtDraw.width / 2.0f; b = rtDraw.height / 2.0f; @@ -77,11 +77,11 @@ void XFA_BOX_GetPath_Arc(CXFA_Box* box, -sweepAngle.value_or(360) * FX_PI / 180.0f); } -void XFA_BOX_StrokeArc(CXFA_Box* box, - CXFA_Graphics* pGS, - CFX_RectF rtWidget, - const CFX_Matrix& matrix, - bool forceRound) { +void XFA_BOX_StrokeArcOrRounded(CXFA_Box* box, + CXFA_Graphics* pGS, + CFX_RectF rtWidget, + const CFX_Matrix& matrix, + bool forceRound) { CXFA_Edge* edge = box->GetEdgeIfExists(0); if (!edge || !edge->IsVisible()) return; @@ -112,7 +112,7 @@ void XFA_BOX_StrokeArc(CXFA_Box* box, return; CXFA_GEPath arcPath; - XFA_BOX_GetPath_Arc(box, rtWidget, arcPath, forceRound); + XFA_BOX_GetPath_ArcOrRounded(box, rtWidget, arcPath, forceRound); if (edge) edge->Stroke(&arcPath, pGS, matrix); return; @@ -322,7 +322,7 @@ void CXFA_Box::Draw(CXFA_Graphics* pGS, DrawFill(strokes, pGS, rtWidget, matrix, forceRound); XFA_Element type = GetElementType(); if (type == XFA_Element::Arc || forceRound) { - XFA_BOX_StrokeArc(this, pGS, rtWidget, matrix, forceRound); + XFA_BOX_StrokeArcOrRounded(this, pGS, rtWidget, matrix, forceRound); } else if (type == XFA_Element::Rectangle || type == XFA_Element::Border) { ToRectangle(this)->Draw(strokes, pGS, rtWidget, matrix); } else { @@ -353,7 +353,7 @@ void CXFA_Box::DrawFill(const std::vector& strokes, else if (iHand == XFA_AttributeEnum::Right) rtWidget.Deflate(fHalf, fHalf); - XFA_BOX_GetPath_Arc(this, rtWidget, fillPath, forceRound); + XFA_BOX_GetPath_ArcOrRounded(this, rtWidget, fillPath, forceRound); } else if (type == XFA_Element::Rectangle || type == XFA_Element::Border) { ToRectangle(this)->GetFillPath(strokes, rtWidget, &fillPath); } else { -- cgit v1.2.3