diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_box.cpp | 16 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_box.h | 4 |
2 files changed, 10 insertions, 10 deletions
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<CXFA_Stroke*>& 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<CXFA_Stroke*>& 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<int32_t> startAngle = GetStartAngle(); Optional<int32_t> 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_ |