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