summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_pattern.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_pattern.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/fpdfapi/page/cpdf_pattern.cpp b/core/fpdfapi/page/cpdf_pattern.cpp
index b0a2d81bca..88e5dee35c 100644
--- a/core/fpdfapi/page/cpdf_pattern.cpp
+++ b/core/fpdfapi/page/cpdf_pattern.cpp
@@ -6,13 +6,17 @@
#include "core/fpdfapi/page/cpdf_pattern.h"
-CPDF_Pattern::CPDF_Pattern(PatternType type,
- CPDF_Document* pDoc,
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
+
+CPDF_Pattern::CPDF_Pattern(CPDF_Document* pDoc,
CPDF_Object* pObj,
const CFX_Matrix& parentMatrix)
- : m_PatternType(type),
- m_pDocument(pDoc),
- m_pPatternObj(pObj),
- m_ParentMatrix(parentMatrix) {}
+ : m_pDocument(pDoc), m_pPatternObj(pObj), m_ParentMatrix(parentMatrix) {}
CPDF_Pattern::~CPDF_Pattern() {}
+
+void CPDF_Pattern::SetPatternToFormMatrix() {
+ CPDF_Dictionary* pDict = pattern_obj()->GetDict();
+ m_Pattern2Form = pDict->GetMatrixFor("Matrix");
+ m_Pattern2Form.Concat(m_ParentMatrix);
+}