• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
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_COLOR_H_
8 #define XFA_FXFA_PARSER_CXFA_COLOR_H_
9 
10 #include "core/fxcrt/widestring.h"
11 #include "xfa/fxfa/parser/cxfa_node.h"
12 
13 class CXFA_Color final : public CXFA_Node {
14  public:
15   static constexpr FX_ARGB kBlackColor = 0xFF000000;
16   static FX_ARGB StringToFXARGB(WideStringView view);
17 
18   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
19   ~CXFA_Color() override;
20 
21   FX_ARGB GetValue() const;
22   FX_ARGB GetValueOrDefault(FX_ARGB defaultValue) const;
23   void SetValue(FX_ARGB color);
24 
25  private:
26   CXFA_Color(CXFA_Document* doc, XFA_PacketType packet);
27 };
28 
29 #endif  // XFA_FXFA_PARSER_CXFA_COLOR_H_
30