OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_PARSER_CXFA_BOX_H_ | 7 #ifndef XFA_FXFA_PARSER_CXFA_BOX_H_ |
8 #define XFA_FXFA_PARSER_CXFA_BOX_H_ | 8 #define XFA_FXFA_PARSER_CXFA_BOX_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
11 #include "xfa/fxfa/parser/cxfa_data.h" | 11 #include "xfa/fxfa/parser/cxfa_data.h" |
12 #include "xfa/fxfa/parser/cxfa_edge.h" | 12 #include "xfa/fxfa/parser/cxfa_edge.h" |
13 #include "xfa/fxfa/parser/cxfa_fill.h" | 13 #include "xfa/fxfa/parser/cxfa_fill.h" |
14 #include "xfa/fxfa/parser/cxfa_margin.h" | 14 #include "xfa/fxfa/parser/cxfa_margin.h" |
15 | 15 |
16 class CXFA_Node; | 16 class CXFA_Node; |
17 | 17 |
18 class CXFA_Box : public CXFA_Data { | 18 class CXFA_Box : public CXFA_Data { |
19 public: | 19 public: |
20 explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} | 20 explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} |
21 | 21 |
22 bool IsArc() const { return GetClassID() == XFA_ELEMENT_Arc; } | 22 bool IsArc() const { return GetClassID() == XFA_Element::Arc; } |
23 bool IsBorder() const { return GetClassID() == XFA_ELEMENT_Border; } | 23 bool IsBorder() const { return GetClassID() == XFA_Element::Border; } |
24 bool IsRectangle() const { return GetClassID() == XFA_ELEMENT_Rectangle; } | 24 bool IsRectangle() const { return GetClassID() == XFA_Element::Rectangle; } |
25 int32_t GetHand() const; | 25 int32_t GetHand() const; |
26 int32_t GetPresence() const; | 26 int32_t GetPresence() const; |
27 int32_t CountEdges() const; | 27 int32_t CountEdges() const; |
28 CXFA_Edge GetEdge(int32_t nIndex = 0) const; | 28 CXFA_Edge GetEdge(int32_t nIndex = 0) const; |
29 void GetStrokes(CXFA_StrokeArray& strokes) const; | 29 void GetStrokes(CXFA_StrokeArray& strokes) const; |
30 FX_BOOL IsCircular() const; | 30 FX_BOOL IsCircular() const; |
31 FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const; | 31 FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const; |
32 FX_FLOAT GetStartAngle() const { | 32 FX_FLOAT GetStartAngle() const { |
33 FX_FLOAT fStartAngle; | 33 FX_FLOAT fStartAngle; |
34 GetStartAngle(fStartAngle); | 34 GetStartAngle(fStartAngle); |
35 return fStartAngle; | 35 return fStartAngle; |
36 } | 36 } |
37 | 37 |
38 FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const; | 38 FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const; |
39 FX_FLOAT GetSweepAngle() const { | 39 FX_FLOAT GetSweepAngle() const { |
40 FX_FLOAT fSweepAngle; | 40 FX_FLOAT fSweepAngle; |
41 GetSweepAngle(fSweepAngle); | 41 GetSweepAngle(fSweepAngle); |
42 return fSweepAngle; | 42 return fSweepAngle; |
43 } | 43 } |
44 | 44 |
45 CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const; | 45 CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const; |
46 CXFA_Margin GetMargin() const; | 46 CXFA_Margin GetMargin() const; |
47 int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const; | 47 int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const; |
48 }; | 48 }; |
49 | 49 |
50 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ | 50 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ |
OLD | NEW |