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

Side by Side Diff: core/fpdfapi/fpdf_page/include/cpdf_generalstate.h

Issue 2379033002: Move core/fpdfapi/fpdf_page/include to core/fpdfapi/fpdf_page (Closed)
Patch Set: Header sort Created 4 years, 2 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
(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 CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
9
10 #include "core/fxcrt/include/fx_basic.h"
11 #include "core/fxcrt/include/fx_coordinates.h"
12 #include "core/fxge/include/fx_dib.h"
13
14 class CPDF_Object;
15 class CPDF_TransferFunc;
16
17 class CPDF_GeneralState {
18 public:
19 CPDF_GeneralState();
20 CPDF_GeneralState(const CPDF_GeneralState& that);
21 ~CPDF_GeneralState();
22
23 void Emplace() { m_Ref.Emplace(); }
24 explicit operator bool() const { return !!m_Ref; }
25
26 void SetRenderIntent(const CFX_ByteString& ri);
27
28 int GetBlendType() const;
29 void SetBlendType(int type);
30
31 FX_FLOAT GetFillAlpha() const;
32 void SetFillAlpha(FX_FLOAT alpha);
33
34 FX_FLOAT GetStrokeAlpha() const;
35 void SetStrokeAlpha(FX_FLOAT alpha);
36
37 CPDF_Object* GetSoftMask() const;
38 void SetSoftMask(CPDF_Object* pObject);
39
40 CPDF_Object* GetTR() const;
41 void SetTR(CPDF_Object* pObject);
42
43 CPDF_TransferFunc* GetTransferFunc() const;
44 void SetTransferFunc(CPDF_TransferFunc* pFunc);
45
46 void SetBlendMode(const CFX_ByteString& mode);
47
48 const CFX_Matrix* GetSMaskMatrix() const;
49 void SetSMaskMatrix(const CFX_Matrix& matrix);
50
51 bool GetFillOP() const;
52 void SetFillOP(bool op);
53
54 bool GetStrokeOP() const;
55 void SetStrokeOP(bool op);
56
57 int GetOPMode() const;
58 void SetOPMode(int mode);
59
60 void SetBG(CPDF_Object* pObject);
61 void SetUCR(CPDF_Object* pObject);
62 void SetHT(CPDF_Object* pObject);
63
64 void SetFlatness(FX_FLOAT flatness);
65 void SetSmoothness(FX_FLOAT smoothness);
66
67 bool GetStrokeAdjust() const;
68 void SetStrokeAdjust(bool adjust);
69
70 void SetAlphaSource(bool source);
71 void SetTextKnockout(bool knockout);
72
73 void SetMatrix(const CFX_Matrix& matrix);
74 CFX_Matrix* GetMutableMatrix();
75
76 private:
77 class StateData {
78 public:
79 StateData();
80 StateData(const StateData& that);
81 ~StateData();
82
83 CFX_ByteString m_BlendMode;
84 int m_BlendType;
85 CPDF_Object* m_pSoftMask;
86 CFX_Matrix m_SMaskMatrix;
87 FX_FLOAT m_StrokeAlpha;
88 FX_FLOAT m_FillAlpha;
89 CPDF_Object* m_pTR;
90 CPDF_TransferFunc* m_pTransferFunc;
91 CFX_Matrix m_Matrix;
92 int m_RenderIntent;
93 bool m_StrokeAdjust;
94 bool m_AlphaSource;
95 bool m_TextKnockout;
96 bool m_StrokeOP;
97 bool m_FillOP;
98 int m_OPMode;
99 CPDF_Object* m_pBG;
100 CPDF_Object* m_pUCR;
101 CPDF_Object* m_pHT;
102 FX_FLOAT m_Flatness;
103 FX_FLOAT m_Smoothness;
104 };
105
106 CFX_CountRef<StateData> m_Ref;
107 };
108
109 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_formobject.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698