diff options
author | thestig <thestig@chromium.org> | 2016-04-26 11:46:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 11:46:02 -0700 |
commit | 5cc24654fb345189140acb4711ff981e1c720951 (patch) | |
tree | 1e9e11a9136363e2b330ffbbce6fdf9e3827b5b1 /core/fpdfapi/fpdf_page/cpdf_pattern.h | |
parent | 76c53794b6202ec37f6dcace5f2ae86870e953b6 (diff) | |
download | pdfium-5cc24654fb345189140acb4711ff981e1c720951.tar.xz |
Clean up CPDF_Page.
- Merge CPDF_Page::Load() into ctor.
- Remove always nullptr param for CPDF_Page::ParseContent().
- Remove unneeded indirection in IPDF_RenderModule.
- Delete CPDF_ParseOptions.
- Fix up CPDF_Pattern.
Review URL: https://codereview.chromium.org/1918113002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_pattern.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_pattern.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_pattern.h b/core/fpdfapi/fpdf_page/cpdf_pattern.h index 7f9a33bac9..d6ef49c7fb 100644 --- a/core/fpdfapi/fpdf_page/cpdf_pattern.h +++ b/core/fpdfapi/fpdf_page/cpdf_pattern.h @@ -12,6 +12,8 @@ class CPDF_Document; class CPDF_Object; +class CPDF_ShadingPattern; +class CPDF_TilingPattern; class CPDF_Pattern { public: @@ -19,13 +21,13 @@ class CPDF_Pattern { virtual ~CPDF_Pattern(); - void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; } + virtual CPDF_TilingPattern* AsTilingPattern() = 0; + virtual CPDF_ShadingPattern* AsShadingPattern() = 0; - const PatternType m_PatternType; - CPDF_Document* const m_pDocument; - CPDF_Object* const m_pPatternObj; - CFX_Matrix m_Pattern2Form; - CFX_Matrix m_ParentMatrix; + CPDF_Document* document() { return m_pDocument; } + CPDF_Object* pattern_obj() { return m_pPatternObj; } + CFX_Matrix* pattern_to_form() { return &m_Pattern2Form; } + CFX_Matrix* parent_matrix() { return &m_ParentMatrix; } protected: CPDF_Pattern(PatternType type, @@ -33,7 +35,11 @@ class CPDF_Pattern { CPDF_Object* pObj, const CFX_Matrix* pParentMatrix); - FX_BOOL m_bForceClear; + const PatternType m_PatternType; + CPDF_Document* const m_pDocument; + CPDF_Object* const m_pPatternObj; + CFX_Matrix m_Pattern2Form; + CFX_Matrix m_ParentMatrix; }; #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_PATTERN_H_ |