summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-05-02 20:47:20 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-02 20:47:20 +0000
commitfceaf42fb5930070415703e448ecce39e9dc0522 (patch)
tree7ba4fda605a4093ce3a9e1f3e06e38feeca5bfc2 /xfa
parent20c62003660cc7bf7ab28a5e638556e22d5a525b (diff)
downloadpdfium-fceaf42fb5930070415703e448ecce39e9dc0522.tar.xz
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 <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/parser/cxfa_box.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_box.h4
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_