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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_shadingpattern.h

Issue 1824033002: Split core/include/fpdfapi/fpdf_resource.h (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
(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_CPDF_SHADINGPATTERN_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_
9
10 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h"
11 #include "core/fpdfapi/fpdf_page/cpdf_pattern.h"
12 #include "core/fpdfapi/fpdf_page/pageint.h"
13 #include "core/fxcrt/include/fx_system.h"
14
15 typedef enum {
16 kInvalidShading = 0,
17 kFunctionBasedShading = 1,
18 kAxialShading = 2,
19 kRadialShading = 3,
20 kFreeFormGouraudTriangleMeshShading = 4,
21 kLatticeFormGouraudTriangleMeshShading = 5,
22 kCoonsPatchMeshShading = 6,
23 kTensorProductPatchMeshShading = 7,
24 kMaxShading = 8
25 } ShadingType;
26
27 class CFX_Matrix;
28 class CPDF_ColorSpace;
29 class CPDF_Document;
30 class CPDF_Object;
31
32 class CPDF_ShadingPattern : public CPDF_Pattern {
33 public:
34 CPDF_ShadingPattern(CPDF_Document* pDoc,
35 CPDF_Object* pPatternObj,
36 FX_BOOL bShading,
37 const CFX_Matrix* parentMatrix);
38
39 ~CPDF_ShadingPattern() override;
40
41 bool IsMeshShading() const {
42 return m_ShadingType == kFreeFormGouraudTriangleMeshShading ||
43 m_ShadingType == kLatticeFormGouraudTriangleMeshShading ||
44 m_ShadingType == kCoonsPatchMeshShading ||
45 m_ShadingType == kTensorProductPatchMeshShading;
46 }
47 FX_BOOL Load();
48
49 ShadingType m_ShadingType;
50 FX_BOOL m_bShadingObj;
51 CPDF_Object* m_pShadingObj;
52
53 // Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed
54 // as counted objects. Refer to CPDF_DocPageData::GetColorSpace.
55 CPDF_ColorSpace* m_pCS;
56
57 CPDF_CountedColorSpace* m_pCountedCS;
58 CPDF_Function* m_pFunctions[4];
59 int m_nFuncs;
60 };
61
62 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_SHADINGPATTERN_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_shadingobject.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698