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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_pattern.h

Issue 1918113002: Clean up CPDF_Page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: more Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_parseoptions.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_pattern.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_pattern.h
diff --git a/core/fpdfapi/fpdf_page/cpdf_pattern.h b/core/fpdfapi/fpdf_page/cpdf_pattern.h
index 7f9a33bac9fd70dcc15d48f1350bcf3c66099fd3..d6ef49c7fb66e97d31ffe3f830da51057c7ab4e9 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_
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_parseoptions.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698