summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobjectholder.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-10 18:07:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-10 18:07:35 +0000
commit3d1ab2d09ab96a6393c0612d9c4153d10d5028ce (patch)
tree9a7be966344aeeaddf44b99f2a86a7f177ac17a9 /core/fpdfapi/page/cpdf_pageobjectholder.h
parentf4f19b51b2d588abe80df8493c23d708ec63f1b7 (diff)
downloadpdfium-3d1ab2d09ab96a6393c0612d9c4153d10d5028ce.tar.xz
Add CPDF_Transparency.
Encapsulates transparency status instead of having it be a raw int. Change-Id: I8b10dafa97da112795cf84c46cf416a0294551d5 Reviewed-on: https://pdfium-review.googlesource.com/32194 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.h')
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index dc1a607cf0..61004444c0 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -12,6 +12,7 @@
#include <vector>
#include "core/fpdfapi/page/cpdf_pageobjectlist.h"
+#include "core/fpdfapi/render/cpdf_transparency.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -23,9 +24,6 @@ class CPDF_Document;
class CPDF_Stream;
class PauseIndicatorIface;
-#define PDFTRANS_GROUP 0x0100
-#define PDFTRANS_ISOLATED 0x0200
-
// These structs are used to keep track of resources that have already been
// generated in the page object holder.
struct GraphicsData {
@@ -72,7 +70,7 @@ class CPDF_PageObjectHolder {
const CFX_Matrix& GetLastCTM() const { return m_LastCTM; }
const CFX_FloatRect& GetBBox() const { return m_BBox; }
- int GetTransparency() const { return m_iTransparency; }
+ const CPDF_Transparency& GetTransparency() const { return m_Transparency; }
bool BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; }
void SetBackgroundAlphaNeeded(bool needed) {
m_bBackgroundAlphaNeeded = needed;
@@ -101,7 +99,7 @@ class CPDF_PageObjectHolder {
const UnownedPtr<CPDF_Dictionary> m_pFormDict;
UnownedPtr<CPDF_Document> m_pDocument;
CFX_FloatRect m_BBox;
- int m_iTransparency = 0;
+ CPDF_Transparency m_Transparency;
bool m_bBackgroundAlphaNeeded = false;
std::vector<CFX_FloatRect> m_MaskBoundingBoxes;
ParseState m_ParseState = CONTENT_NOT_PARSED;