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

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

Issue 2310693002: Use safe bool conversion operators in fpdf_page/ (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_contentmark.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
9 9
10 #include "core/fxcrt/include/fx_basic.h" 10 #include "core/fxcrt/include/fx_basic.h"
11 #include "core/fxcrt/include/fx_coordinates.h" 11 #include "core/fxcrt/include/fx_coordinates.h"
12 #include "core/fxge/include/fx_dib.h" 12 #include "core/fxge/include/fx_dib.h"
13 13
14 class CPDF_Object; 14 class CPDF_Object;
15 class CPDF_TransferFunc; 15 class CPDF_TransferFunc;
16 16
17 class CPDF_GeneralState { 17 class CPDF_GeneralState {
18 public: 18 public:
19 CPDF_GeneralState(); 19 CPDF_GeneralState();
20 CPDF_GeneralState(const CPDF_GeneralState& that); 20 CPDF_GeneralState(const CPDF_GeneralState& that);
21 ~CPDF_GeneralState(); 21 ~CPDF_GeneralState();
22 22
23 void Emplace() { m_Ref.Emplace(); } 23 void Emplace() { m_Ref.Emplace(); }
24 operator bool() const { return !!m_Ref; } 24 explicit operator bool() const { return !!m_Ref; }
25 25
26 void SetRenderIntent(const CFX_ByteString& ri); 26 void SetRenderIntent(const CFX_ByteString& ri);
27 27
28 int GetBlendType() const; 28 int GetBlendType() const;
29 void SetBlendType(int type); 29 void SetBlendType(int type);
30 30
31 FX_FLOAT GetFillAlpha() const; 31 FX_FLOAT GetFillAlpha() const;
32 void SetFillAlpha(FX_FLOAT alpha); 32 void SetFillAlpha(FX_FLOAT alpha);
33 33
34 FX_FLOAT GetStrokeAlpha() const; 34 FX_FLOAT GetStrokeAlpha() const;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 CPDF_Object* m_pUCR; 100 CPDF_Object* m_pUCR;
101 CPDF_Object* m_pHT; 101 CPDF_Object* m_pHT;
102 FX_FLOAT m_Flatness; 102 FX_FLOAT m_Flatness;
103 FX_FLOAT m_Smoothness; 103 FX_FLOAT m_Smoothness;
104 }; 104 };
105 105
106 CFX_CountRef<StateData> m_Ref; 106 CFX_CountRef<StateData> m_Ref;
107 }; 107 };
108 108
109 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ 109 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_contentmark.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698