From fceaf42fb5930070415703e448ecce39e9dc0522 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 2 May 2018 20:47:20 +0000 Subject: Use pointer instead of ref for CXFA_Box::GetPathArcOrRounded param. Change-Id: I1bfada610b8bf2e1f8e0f79a9421db9ebedc7311 Reviewed-on: https://pdfium-review.googlesource.com/32010 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- xfa/fxfa/parser/cxfa_box.cpp | 16 ++++++++-------- xfa/fxfa/parser/cxfa_box.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp index b81461285f..673b77dfd7 100644 --- a/xfa/fxfa/parser/cxfa_box.cpp +++ b/xfa/fxfa/parser/cxfa_box.cpp @@ -230,7 +230,7 @@ void CXFA_Box::DrawFill(const std::vector& strokes, else if (iHand == XFA_AttributeEnum::Right) rtWidget.Deflate(fHalf, fHalf); - GetPathArcOrRounded(rtWidget, fillPath, forceRound); + GetPathArcOrRounded(rtWidget, forceRound, &fillPath); } else if (type == XFA_Element::Rectangle || type == XFA_Element::Border) { ToRectangle(this)->GetFillPath(strokes, rtWidget, &fillPath); } else { @@ -243,8 +243,8 @@ void CXFA_Box::DrawFill(const std::vector& strokes, } void CXFA_Box::GetPathArcOrRounded(CFX_RectF rtDraw, - CXFA_GEPath& fillPath, - bool forceRound) { + bool forceRound, + CXFA_GEPath* fillPath) { float a, b; a = rtDraw.width / 2.0f; b = rtDraw.height / 2.0f; @@ -259,13 +259,13 @@ void CXFA_Box::GetPathArcOrRounded(CFX_RectF rtDraw, Optional startAngle = GetStartAngle(); Optional sweepAngle = GetSweepAngle(); if (!startAngle && !sweepAngle) { - fillPath.AddEllipse(rtDraw); + fillPath->AddEllipse(rtDraw); return; } - fillPath.AddArc(rtDraw.TopLeft(), rtDraw.Size(), - -startAngle.value_or(0) * FX_PI / 180.0f, - -sweepAngle.value_or(360) * FX_PI / 180.0f); + fillPath->AddArc(rtDraw.TopLeft(), rtDraw.Size(), + -startAngle.value_or(0) * FX_PI / 180.0f, + -sweepAngle.value_or(360) * FX_PI / 180.0f); } void CXFA_Box::StrokeArcOrRounded(CXFA_Graphics* pGS, @@ -302,7 +302,7 @@ void CXFA_Box::StrokeArcOrRounded(CXFA_Graphics* pGS, return; CXFA_GEPath arcPath; - GetPathArcOrRounded(rtWidget, arcPath, forceRound); + GetPathArcOrRounded(rtWidget, forceRound, &arcPath); if (edge) edge->Stroke(&arcPath, pGS, matrix); return; diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h index 0831cd603e..5431ef8fc8 100644 --- a/xfa/fxfa/parser/cxfa_box.h +++ b/xfa/fxfa/parser/cxfa_box.h @@ -68,8 +68,8 @@ class CXFA_Box : public CXFA_Node { const CFX_Matrix& matrix, bool forceRound); void GetPathArcOrRounded(CFX_RectF rtDraw, - CXFA_GEPath& fillPath, - bool forceRound); + bool forceRound, + CXFA_GEPath* fillPath); }; #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ -- cgit v1.2.3