summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_box.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-17 19:22:36 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-17 19:22:36 +0000
commitdcc2f3cf96fd20782c32ae03629427fb93b219b2 (patch)
treef059012e08e31ecf2e61ae661d365996cff87209 /xfa/fxfa/parser/cxfa_box.h
parent238c6bf3c4c44e1edcae44a1f89c543ab6a28737 (diff)
downloadpdfium-dcc2f3cf96fd20782c32ae03629427fb93b219b2.tar.xz
Cleanup some CXFA_Box methods
Shuffle some code around, make things a little cleaner. Change-Id: I4cbdf4fc7e7d0a372cdc5cb63b45ca196a037543 Reviewed-on: https://pdfium-review.googlesource.com/23113 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_box.h')
-rw-r--r--xfa/fxfa/parser/cxfa_box.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h
index 9a9770bf4f..0831cd603e 100644
--- a/xfa/fxfa/parser/cxfa_box.h
+++ b/xfa/fxfa/parser/cxfa_box.h
@@ -13,6 +13,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "xfa/fxfa/parser/cxfa_node.h"
+#include "xfa/fxgraphics/cxfa_gepath.h"
class CXFA_Edge;
class CXFA_Fill;
@@ -24,24 +25,15 @@ class CXFA_Box : public CXFA_Node {
public:
~CXFA_Box() override;
- bool IsArc() const { return GetElementType() == XFA_Element::Arc; }
- bool IsCircular();
-
- XFA_AttributeEnum GetHand();
XFA_AttributeEnum GetPresence();
std::tuple<XFA_AttributeEnum, bool, float> Get3DStyle();
int32_t CountEdges();
CXFA_Edge* GetEdgeIfExists(int32_t nIndex);
- CXFA_Fill* GetFillIfExists() const;
CXFA_Fill* GetOrCreateFillIfPossible();
- CXFA_Margin* GetMarginIfExists();
std::vector<CXFA_Stroke*> GetStrokes();
- Optional<int32_t> GetStartAngle();
- Optional<int32_t> GetSweepAngle();
-
void Draw(CXFA_Graphics* pGS,
const CFX_RectF& rtWidget,
const CFX_Matrix& matrix,
@@ -58,13 +50,26 @@ class CXFA_Box : public CXFA_Node {
const WideStringView& elementName,
std::unique_ptr<CJX_Object> js_node);
+ XFA_AttributeEnum GetHand();
+
private:
+ bool IsCircular();
+ Optional<int32_t> GetStartAngle();
+ Optional<int32_t> GetSweepAngle();
+
std::vector<CXFA_Stroke*> GetStrokesInternal(bool bNull);
void DrawFill(const std::vector<CXFA_Stroke*>& strokes,
CXFA_Graphics* pGS,
CFX_RectF rtWidget,
const CFX_Matrix& matrix,
bool forceRound);
+ void StrokeArcOrRounded(CXFA_Graphics* pGS,
+ CFX_RectF rtWidget,
+ const CFX_Matrix& matrix,
+ bool forceRound);
+ void GetPathArcOrRounded(CFX_RectF rtDraw,
+ CXFA_GEPath& fillPath,
+ bool forceRound);
};
#endif // XFA_FXFA_PARSER_CXFA_BOX_H_