summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobjectholder.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.h')
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index c95ae50520..4733e06b2c 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_
#define CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_
+#include <map>
#include <memory>
#include <vector>
@@ -25,11 +26,28 @@ class CPDF_ContentParser;
#define PDFTRANS_ISOLATED 0x0200
#define PDFTRANS_KNOCKOUT 0x0400
+// These structs are used to keep track of resources that have already been
+// generated in the page object holder.
+struct GraphicsData {
+ float fillAlpha;
+ float strokeAlpha;
+ int blendType;
+ bool operator<(const GraphicsData& other) const;
+};
+
+struct FontData {
+ CFX_ByteString baseFont;
+ CFX_ByteString type;
+ bool operator<(const FontData& other) const;
+};
+
class CPDF_PageObjectHolder {
public:
CPDF_PageObjectHolder(CPDF_Document* pDoc, CPDF_Dictionary* pFormDict);
virtual ~CPDF_PageObjectHolder();
+ virtual bool IsPage() const;
+
void ContinueParse(IFX_Pause* pPause);
bool IsParsed() const { return m_ParseState == CONTENT_PARSED; }
@@ -56,6 +74,8 @@ class CPDF_PageObjectHolder {
CFX_UnownedPtr<CPDF_Document> m_pDocument;
CFX_UnownedPtr<CPDF_Dictionary> m_pPageResources;
CFX_UnownedPtr<CPDF_Dictionary> m_pResources;
+ std::map<GraphicsData, CFX_ByteString> m_GraphicsMap;
+ std::map<FontData, CFX_ByteString> m_FontsMap;
CFX_FloatRect m_BBox;
int m_Transparency;