OLD | NEW |
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_CPDF_SHADINGPATTERN_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_ |
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" | 10 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class CFX_Matrix; | 27 class CFX_Matrix; |
28 class CPDF_ColorSpace; | 28 class CPDF_ColorSpace; |
29 class CPDF_Document; | 29 class CPDF_Document; |
30 class CPDF_Object; | 30 class CPDF_Object; |
31 | 31 |
32 class CPDF_ShadingPattern : public CPDF_Pattern { | 32 class CPDF_ShadingPattern : public CPDF_Pattern { |
33 public: | 33 public: |
34 CPDF_ShadingPattern(CPDF_Document* pDoc, | 34 CPDF_ShadingPattern(CPDF_Document* pDoc, |
35 CPDF_Object* pPatternObj, | 35 CPDF_Object* pPatternObj, |
36 FX_BOOL bShading, | 36 FX_BOOL bShading, |
37 const CFX_Matrix* parentMatrix); | 37 const CFX_Matrix& parentMatrix); |
38 | 38 |
39 ~CPDF_ShadingPattern() override; | 39 ~CPDF_ShadingPattern() override; |
40 | 40 |
41 CPDF_TilingPattern* AsTilingPattern() override { return nullptr; } | 41 CPDF_TilingPattern* AsTilingPattern() override { return nullptr; } |
42 CPDF_ShadingPattern* AsShadingPattern() override { return this; } | 42 CPDF_ShadingPattern* AsShadingPattern() override { return this; } |
43 | 43 |
44 bool IsMeshShading() const { | 44 bool IsMeshShading() const { |
45 return m_ShadingType == kFreeFormGouraudTriangleMeshShading || | 45 return m_ShadingType == kFreeFormGouraudTriangleMeshShading || |
46 m_ShadingType == kLatticeFormGouraudTriangleMeshShading || | 46 m_ShadingType == kLatticeFormGouraudTriangleMeshShading || |
47 m_ShadingType == kCoonsPatchMeshShading || | 47 m_ShadingType == kCoonsPatchMeshShading || |
48 m_ShadingType == kTensorProductPatchMeshShading; | 48 m_ShadingType == kTensorProductPatchMeshShading; |
49 } | 49 } |
50 FX_BOOL Load(); | 50 FX_BOOL Load(); |
51 | 51 |
52 ShadingType m_ShadingType; | 52 ShadingType m_ShadingType; |
53 FX_BOOL m_bShadingObj; | 53 FX_BOOL m_bShadingObj; |
54 CPDF_Object* m_pShadingObj; | 54 CPDF_Object* m_pShadingObj; |
55 | 55 |
56 // Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed | 56 // Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed |
57 // as counted objects. Refer to CPDF_DocPageData::GetColorSpace. | 57 // as counted objects. Refer to CPDF_DocPageData::GetColorSpace. |
58 CPDF_ColorSpace* m_pCS; | 58 CPDF_ColorSpace* m_pCS; |
59 | 59 |
60 CPDF_CountedColorSpace* m_pCountedCS; | 60 CPDF_CountedColorSpace* m_pCountedCS; |
61 CPDF_Function* m_pFunctions[4]; | 61 CPDF_Function* m_pFunctions[4]; |
62 size_t m_nFuncs; | 62 size_t m_nFuncs; |
63 }; | 63 }; |
64 | 64 |
65 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_ | 65 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_ |
OLD | NEW |