summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.h1
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.cpp3
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.h b/core/fpdfapi/page/cpdf_contentparser.h
index 58a977301f..b18e07036c 100644
--- a/core/fpdfapi/page/cpdf_contentparser.h
+++ b/core/fpdfapi/page/cpdf_contentparser.h
@@ -29,6 +29,7 @@ class CPDF_ContentParser {
~CPDF_ContentParser();
ParseStatus GetStatus() const { return m_Status; }
+ CPDF_StreamContentParser* GetParser() const { return m_pParser.get(); }
void Start(CPDF_Page* pPage);
void Start(CPDF_Form* pForm,
CPDF_AllStates* pGraphicStates,
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
index 50ef780396..614fa34d2b 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
+#include "core/fpdfapi/page/cpdf_allstates.h"
#include "core/fpdfapi/page/cpdf_contentparser.h"
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
@@ -38,6 +39,8 @@ void CPDF_PageObjectHolder::ContinueParse(IFX_Pause* pPause) {
return;
m_ParseState = CONTENT_PARSED;
+ if (m_pParser->GetParser() && m_pParser->GetParser()->GetCurStates())
+ m_LastCTM = m_pParser->GetParser()->GetCurStates()->m_CTM;
m_pParser.reset();
}
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index 4733e06b2c..87ebbc8460 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -55,6 +55,7 @@ class CPDF_PageObjectHolder {
const CPDF_PageObjectList* GetPageObjectList() const {
return &m_PageObjectList;
}
+ const CFX_Matrix& GetLastCTM() const { return m_LastCTM; }
bool BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; }
void SetBackgroundAlphaNeeded(bool needed) {
@@ -89,6 +90,7 @@ class CPDF_PageObjectHolder {
ParseState m_ParseState;
std::unique_ptr<CPDF_ContentParser> m_pParser;
CPDF_PageObjectList m_PageObjectList;
+ CFX_Matrix m_LastCTM;
};
#endif // CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_