| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ |
| 9 | 9 |
| 10 #include "../fxcrt/fx_system.h" | 10 #include "../fxcrt/fx_system.h" |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 FX_BOOL m_bColored; | 672 FX_BOOL m_bColored; |
| 673 | 673 |
| 674 CFX_FloatRect m_BBox; | 674 CFX_FloatRect m_BBox; |
| 675 | 675 |
| 676 FX_FLOAT m_XStep; | 676 FX_FLOAT m_XStep; |
| 677 | 677 |
| 678 FX_FLOAT m_YStep; | 678 FX_FLOAT m_YStep; |
| 679 | 679 |
| 680 CPDF_Form* m_pForm; | 680 CPDF_Form* m_pForm; |
| 681 }; | 681 }; |
| 682 |
| 683 typedef enum { |
| 684 kInvalidShading = 0, |
| 685 kFunctionBasedShading = 1, |
| 686 kAxialShading = 2, |
| 687 kRadialShading = 3, |
| 688 kFreeFormGouraudTriangleMeshShading = 4, |
| 689 kLatticeFormGouraudTriangleMeshShading = 5, |
| 690 kCoonsPatchMeshShading = 6, |
| 691 kTensorProductPatchMeshShading = 7, |
| 692 kMaxShading = 8 |
| 693 } ShadingType; |
| 694 |
| 682 class CPDF_ShadingPattern : public CPDF_Pattern { | 695 class CPDF_ShadingPattern : public CPDF_Pattern { |
| 683 public: | 696 public: |
| 684 CPDF_ShadingPattern(CPDF_Document* pDoc, | 697 CPDF_ShadingPattern(CPDF_Document* pDoc, |
| 685 CPDF_Object* pPatternObj, | 698 CPDF_Object* pPatternObj, |
| 686 FX_BOOL bShading, | 699 FX_BOOL bShading, |
| 687 const CFX_AffineMatrix* parentMatrix); | 700 const CFX_AffineMatrix* parentMatrix); |
| 688 | 701 |
| 689 ~CPDF_ShadingPattern() override; | 702 ~CPDF_ShadingPattern() override; |
| 690 | 703 |
| 704 bool IsMeshShading() const { |
| 705 return m_ShadingType == kFreeFormGouraudTriangleMeshShading || |
| 706 m_ShadingType == kLatticeFormGouraudTriangleMeshShading || |
| 707 m_ShadingType == kCoonsPatchMeshShading || |
| 708 m_ShadingType == kTensorProductPatchMeshShading; |
| 709 } |
| 710 |
| 691 CPDF_Object* m_pShadingObj; | 711 CPDF_Object* m_pShadingObj; |
| 692 | 712 |
| 693 FX_BOOL m_bShadingObj; | 713 FX_BOOL m_bShadingObj; |
| 694 | 714 |
| 695 FX_BOOL Load(); | 715 FX_BOOL Load(); |
| 696 | 716 |
| 697 FX_BOOL Reload(); | 717 FX_BOOL Reload(); |
| 698 | 718 |
| 699 int m_ShadingType; | 719 ShadingType m_ShadingType; |
| 700 | 720 |
| 701 CPDF_ColorSpace* m_pCS; // Still keep m_pCS as some CPDF_ColorSpace (name | 721 CPDF_ColorSpace* m_pCS; // Still keep m_pCS as some CPDF_ColorSpace (name |
| 702 // object) are not managed as counted objects. Refer | 722 // object) are not managed as counted objects. Refer |
| 703 // to CPDF_DocPageData::GetColorSpace. | 723 // to CPDF_DocPageData::GetColorSpace. |
| 704 | 724 |
| 705 CPDF_CountedColorSpace* m_pCountedCS; | 725 CPDF_CountedColorSpace* m_pCountedCS; |
| 706 | 726 |
| 707 CPDF_Function* m_pFunctions[4]; | 727 CPDF_Function* m_pFunctions[4]; |
| 708 | 728 |
| 709 int m_nFuncs; | 729 int m_nFuncs; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 | 854 |
| 835 FX_BOOL m_bInterpolate; | 855 FX_BOOL m_bInterpolate; |
| 836 | 856 |
| 837 CPDF_Document* m_pDocument; | 857 CPDF_Document* m_pDocument; |
| 838 | 858 |
| 839 CPDF_Dictionary* m_pOC; | 859 CPDF_Dictionary* m_pOC; |
| 840 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); | 860 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); |
| 841 }; | 861 }; |
| 842 | 862 |
| 843 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ | 863 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ |
| OLD | NEW |