summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_transparency.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/render/cpdf_transparency.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/render/cpdf_transparency.h')
-rw-r--r--core/fpdfapi/render/cpdf_transparency.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/fpdfapi/render/cpdf_transparency.h b/core/fpdfapi/render/cpdf_transparency.h
new file mode 100644
index 0000000000..92f7c83b73
--- /dev/null
+++ b/core/fpdfapi/render/cpdf_transparency.h
@@ -0,0 +1,25 @@
+// Copyright 2018 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CORE_FPDFAPI_RENDER_CPDF_TRANSPARENCY_H_
+#define CORE_FPDFAPI_RENDER_CPDF_TRANSPARENCY_H_
+
+class CPDF_Transparency {
+ public:
+ CPDF_Transparency();
+
+ CPDF_Transparency(const CPDF_Transparency& other);
+
+ bool IsGroup() const { return m_bGroup; }
+ bool IsIsolated() const { return m_bIsolated; }
+
+ void SetGroup() { m_bGroup = true; }
+ void SetIsolated() { m_bIsolated = true; }
+
+ private:
+ bool m_bGroup = false;
+ bool m_bIsolated = false;
+};
+
+#endif // CORE_FPDFAPI_RENDER_CPDF_TRANSPARENCY_H_