Chromium Code Reviews| OLD | NEW |
|---|---|
| (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/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h" | |
| 11 #include "core/include/fxcrt/fx_basic.h" | |
| 12 | |
| 13 class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> { | |
| 14 public: | |
| 15 void SetRenderIntent(const CFX_ByteString& ri); | |
| 16 | |
| 17 int GetBlendType() const { | |
| 18 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL; | |
| 19 } | |
| 20 | |
| 21 int GetAlpha(FX_BOOL bStroke) const { | |
| 22 return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha | |
|
Tom Sepez
2016/03/17 20:15:38
nit: too much nesting. I'd add a quick if (!m_pObj
dsinclair
2016/03/17 20:37:41
Done.
| |
| 23 : m_pObject->m_FillAlpha) * | |
| 24 255) | |
| 25 : 255; | |
| 26 } | |
| 27 }; | |
| 28 | |
| 29 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_GENERALSTATE_H_ | |
| OLD | NEW |