| 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_PATTERN_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ |
| 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_coordinates.h" | 10 #include "core/fxcrt/include/fx_coordinates.h" |
| 11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
| 12 | 12 |
| 13 class CPDF_Document; | 13 class CPDF_Document; |
| 14 class CPDF_Object; | 14 class CPDF_Object; |
| 15 class CPDF_ShadingPattern; |
| 16 class CPDF_TilingPattern; |
| 15 | 17 |
| 16 class CPDF_Pattern { | 18 class CPDF_Pattern { |
| 17 public: | 19 public: |
| 18 enum PatternType { TILING = 1, SHADING }; | 20 enum PatternType { TILING = 1, SHADING }; |
| 19 | 21 |
| 20 virtual ~CPDF_Pattern(); | 22 virtual ~CPDF_Pattern(); |
| 21 | 23 |
| 22 void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; } | 24 virtual CPDF_TilingPattern* AsTilingPattern() = 0; |
| 25 virtual CPDF_ShadingPattern* AsShadingPattern() = 0; |
| 23 | 26 |
| 24 const PatternType m_PatternType; | 27 CPDF_Document* document() { return m_pDocument; } |
| 25 CPDF_Document* const m_pDocument; | 28 CPDF_Object* pattern_obj() { return m_pPatternObj; } |
| 26 CPDF_Object* const m_pPatternObj; | 29 CFX_Matrix* pattern_to_form() { return &m_Pattern2Form; } |
| 27 CFX_Matrix m_Pattern2Form; | 30 CFX_Matrix* parent_matrix() { return &m_ParentMatrix; } |
| 28 CFX_Matrix m_ParentMatrix; | |
| 29 | 31 |
| 30 protected: | 32 protected: |
| 31 CPDF_Pattern(PatternType type, | 33 CPDF_Pattern(PatternType type, |
| 32 CPDF_Document* pDoc, | 34 CPDF_Document* pDoc, |
| 33 CPDF_Object* pObj, | 35 CPDF_Object* pObj, |
| 34 const CFX_Matrix* pParentMatrix); | 36 const CFX_Matrix* pParentMatrix); |
| 35 | 37 |
| 36 FX_BOOL m_bForceClear; | 38 const PatternType m_PatternType; |
| 39 CPDF_Document* const m_pDocument; |
| 40 CPDF_Object* const m_pPatternObj; |
| 41 CFX_Matrix m_Pattern2Form; |
| 42 CFX_Matrix m_ParentMatrix; |
| 37 }; | 43 }; |
| 38 | 44 |
| 39 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ | 45 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ |
| OLD | NEW |