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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_tilingpattern.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_shadingpattern.h ('k') | core/fpdfapi/fpdf_page/cpdf_tilingpattern.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_tilingpattern.h
diff --git a/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h b/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h
index 44446eac91d69a1a17b25737e35bca4203e259c3..593630727186b357d2bc6b16e8247066b7f0656c 100644
--- a/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h
+++ b/core/fpdfapi/fpdf_page/cpdf_tilingpattern.h
@@ -7,6 +7,8 @@
#ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_TILINGPATTERN_H_
#define CORE_FPDFAPI_FPDF_PAGE_CPDF_TILINGPATTERN_H_
+#include <memory>
+
#include "core/fpdfapi/fpdf_page/cpdf_pattern.h"
#include "core/fxcrt/include/fx_coordinates.h"
#include "core/fxcrt/include/fx_system.h"
@@ -22,13 +24,23 @@ class CPDF_TilingPattern : public CPDF_Pattern {
const CFX_Matrix* parentMatrix);
~CPDF_TilingPattern() override;
+ CPDF_TilingPattern* AsTilingPattern() override { return this; }
+ CPDF_ShadingPattern* AsShadingPattern() override { return nullptr; }
+
FX_BOOL Load();
- FX_BOOL m_bColored;
+ bool colored() const { return m_bColored; }
+ const CFX_FloatRect& bbox() const { return m_BBox; }
+ FX_FLOAT x_step() const { return m_XStep; }
+ FX_FLOAT y_step() const { return m_YStep; }
+ CPDF_Form* form() const { return m_pForm.get(); }
+
+ private:
+ bool m_bColored;
CFX_FloatRect m_BBox;
FX_FLOAT m_XStep;
FX_FLOAT m_YStep;
- CPDF_Form* m_pForm;
+ std::unique_ptr<CPDF_Form> m_pForm;
};
#endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_TILINGPATTERN_H_
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_shadingpattern.h ('k') | core/fpdfapi/fpdf_page/cpdf_tilingpattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698