Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: xfa/fxfa/parser/cxfa_box.h

Issue 2082573007: Update GetClassID to GetElementType (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@remove_script_obj_hash
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 GetElementType() == XFA_Element::Arc; }
23 bool IsBorder() const { return GetClassID() == XFA_Element::Border; } 23 bool IsBorder() const { return GetElementType() == XFA_Element::Border; }
24 bool IsRectangle() const { return GetClassID() == XFA_Element::Rectangle; } 24 bool IsRectangle() const {
25 return GetElementType() == XFA_Element::Rectangle;
26 }
25 int32_t GetHand() const; 27 int32_t GetHand() const;
26 int32_t GetPresence() const; 28 int32_t GetPresence() const;
27 int32_t CountEdges() const; 29 int32_t CountEdges() const;
28 CXFA_Edge GetEdge(int32_t nIndex = 0) const; 30 CXFA_Edge GetEdge(int32_t nIndex = 0) const;
29 void GetStrokes(CXFA_StrokeArray& strokes) const; 31 void GetStrokes(CXFA_StrokeArray& strokes) const;
30 FX_BOOL IsCircular() const; 32 FX_BOOL IsCircular() const;
31 FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const; 33 FX_BOOL GetStartAngle(FX_FLOAT& fStartAngle) const;
32 FX_FLOAT GetStartAngle() const { 34 FX_FLOAT GetStartAngle() const {
33 FX_FLOAT fStartAngle; 35 FX_FLOAT fStartAngle;
34 GetStartAngle(fStartAngle); 36 GetStartAngle(fStartAngle);
35 return fStartAngle; 37 return fStartAngle;
36 } 38 }
37 39
38 FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const; 40 FX_BOOL GetSweepAngle(FX_FLOAT& fSweepAngle) const;
39 FX_FLOAT GetSweepAngle() const { 41 FX_FLOAT GetSweepAngle() const {
40 FX_FLOAT fSweepAngle; 42 FX_FLOAT fSweepAngle;
41 GetSweepAngle(fSweepAngle); 43 GetSweepAngle(fSweepAngle);
42 return fSweepAngle; 44 return fSweepAngle;
43 } 45 }
44 46
45 CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const; 47 CXFA_Fill GetFill(FX_BOOL bModified = FALSE) const;
46 CXFA_Margin GetMargin() const; 48 CXFA_Margin GetMargin() const;
47 int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const; 49 int32_t Get3DStyle(FX_BOOL& bVisible, FX_FLOAT& fThickness) const;
48 }; 50 };
49 51
50 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_ 52 #endif // XFA_FXFA_PARSER_CXFA_BOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698