• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 CORE_FPDFAPI_PAGE_CPDF_GRAPHICSTATES_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_GRAPHICSTATES_H_
9 
10 #include "core/fpdfapi/page/cpdf_clippath.h"
11 #include "core/fpdfapi/page/cpdf_colorstate.h"
12 #include "core/fpdfapi/page/cpdf_generalstate.h"
13 #include "core/fpdfapi/page/cpdf_textstate.h"
14 #include "core/fxge/cfx_graphstate.h"
15 
16 class CPDF_GraphicStates {
17  public:
18   CPDF_GraphicStates();
19   CPDF_GraphicStates(const CPDF_GraphicStates& that);
20   CPDF_GraphicStates& operator=(const CPDF_GraphicStates& that);
21   ~CPDF_GraphicStates();
22 
23   void SetDefaultStates();
24 
clip_path()25   const CPDF_ClipPath& clip_path() const { return m_ClipPath; }
mutable_clip_path()26   CPDF_ClipPath& mutable_clip_path() { return m_ClipPath; }
27 
graph_state()28   const CFX_GraphState& graph_state() const { return m_GraphState; }
mutable_graph_state()29   CFX_GraphState& mutable_graph_state() { return m_GraphState; }
30 
color_state()31   const CPDF_ColorState& color_state() const { return m_ColorState; }
mutable_color_state()32   CPDF_ColorState& mutable_color_state() { return m_ColorState; }
33 
text_state()34   const CPDF_TextState& text_state() const { return m_TextState; }
mutable_text_state()35   CPDF_TextState& mutable_text_state() { return m_TextState; }
36 
general_state()37   const CPDF_GeneralState& general_state() const { return m_GeneralState; }
mutable_general_state()38   CPDF_GeneralState& mutable_general_state() { return m_GeneralState; }
39 
40  private:
41   CPDF_ClipPath m_ClipPath;
42   CFX_GraphState m_GraphState;
43   CPDF_ColorState m_ColorState;
44   CPDF_TextState m_TextState;
45   CPDF_GeneralState m_GeneralState;
46 };
47 
48 #endif  // CORE_FPDFAPI_PAGE_CPDF_GRAPHICSTATES_H_
49