| 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 <vector> |
| 11 |
| 10 #include "core/fxcrt/fx_system.h" | 12 #include "core/fxcrt/fx_system.h" |
| 11 #include "xfa/fxfa/parser/cxfa_data.h" | 13 #include "xfa/fxfa/parser/cxfa_data.h" |
| 12 #include "xfa/fxfa/parser/cxfa_edge.h" | 14 #include "xfa/fxfa/parser/cxfa_edge.h" |
| 13 #include "xfa/fxfa/parser/cxfa_fill.h" | 15 #include "xfa/fxfa/parser/cxfa_fill.h" |
| 14 #include "xfa/fxfa/parser/cxfa_margin.h" | 16 #include "xfa/fxfa/parser/cxfa_margin.h" |
| 15 | 17 |
| 16 class CXFA_Node; | 18 class CXFA_Node; |
| 17 | 19 |
| 18 class CXFA_Box : public CXFA_Data { | 20 class CXFA_Box : public CXFA_Data { |
| 19 public: | 21 public: |
| 20 explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} | 22 explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} |
| 21 | 23 |
| 22 bool IsArc() const { return GetElementType() == XFA_Element::Arc; } | 24 bool IsArc() const { return GetElementType() == XFA_Element::Arc; } |
| 23 bool IsBorder() const { return GetElementType() == XFA_Element::Border; } | 25 bool IsBorder() const { return GetElementType() == XFA_Element::Border; } |
| 24 bool IsRectangle() const { | 26 bool IsRectangle() const { |
| 25 return GetElementType() == XFA_Element::Rectangle; | 27 return GetElementType() == XFA_Element::Rectangle; |
| 26 } | 28 } |
| 27 int32_t GetHand() const; | 29 int32_t GetHand() const; |
| 28 int32_t GetPresence() const; | 30 int32_t GetPresence() const; |
| 29 int32_t CountEdges() const; | 31 int32_t CountEdges() const; |
| 30 CXFA_Edge GetEdge(int32_t nIndex = 0) const; | 32 CXFA_Edge GetEdge(int32_t nIndex = 0) const; |
| 31 void GetStrokes(CXFA_StrokeArray& strokes) const; | 33 void GetStrokes(std::vector<CXFA_Stroke>* strokes) const; |
| 32 bool IsCircular() const; | 34 bool IsCircular() const; |
| 33 bool GetStartAngle(FX_FLOAT& fStartAngle) const; | 35 bool GetStartAngle(FX_FLOAT& fStartAngle) const; |
| 34 FX_FLOAT GetStartAngle() const { | 36 FX_FLOAT GetStartAngle() const { |
| 35 FX_FLOAT fStartAngle; | 37 FX_FLOAT fStartAngle; |
| 36 GetStartAngle(fStartAngle); | 38 GetStartAngle(fStartAngle); |
| 37 return fStartAngle; | 39 return fStartAngle; |
| 38 } | 40 } |
| 39 | 41 |
| 40 bool GetSweepAngle(FX_FLOAT& fSweepAngle) const; | 42 bool GetSweepAngle(FX_FLOAT& fSweepAngle) const; |
| 41 FX_FLOAT GetSweepAngle() const { | 43 FX_FLOAT GetSweepAngle() const { |
| 42 FX_FLOAT fSweepAngle; | 44 FX_FLOAT fSweepAngle; |
| 43 GetSweepAngle(fSweepAngle); | 45 GetSweepAngle(fSweepAngle); |
| 44 return fSweepAngle; | 46 return fSweepAngle; |
| 45 } | 47 } |
| 46 | 48 |
| 47 CXFA_Fill GetFill(bool bModified = false) const; | 49 CXFA_Fill GetFill(bool bModified = false) const; |
| 48 CXFA_Margin GetMargin() const; | 50 CXFA_Margin GetMargin() const; |
| 49 int32_t Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const; | 51 int32_t Get3DStyle(bool& bVisible, FX_FLOAT& fThickness) const; |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ | 54 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ |
| OLD | NEW |