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

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

Issue 1825953002: Move core/include/fxcrt to core/fxcrt/include. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 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/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h"
11 #include "core/include/fxcrt/fx_basic.h" 11 #include "core/fxcrt/include/fx_basic.h"
12 12
13 class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> { 13 class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> {
14 public: 14 public:
15 void SetRenderIntent(const CFX_ByteString& ri); 15 void SetRenderIntent(const CFX_ByteString& ri);
16 16
17 int GetBlendType() const { 17 int GetBlendType() const {
18 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL; 18 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL;
19 } 19 }
20 20
21 int GetAlpha(FX_BOOL bStroke) const { 21 int GetAlpha(FX_BOOL bStroke) const {
22 if (!m_pObject) 22 if (!m_pObject)
23 return 255; 23 return 255;
24 return FXSYS_round( 24 return FXSYS_round(
25 (bStroke ? m_pObject->m_StrokeAlpha : m_pObject->m_FillAlpha) * 255); 25 (bStroke ? m_pObject->m_StrokeAlpha : m_pObject->m_FillAlpha) * 255);
26 } 26 }
27 }; 27 };
28 28
29 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ 29 #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_generalstatedata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698