summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_color.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_color.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_color.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/page/cpdf_color.cpp b/core/fpdfapi/page/cpdf_color.cpp
index 3c87457d1b..dfee9d93ca 100644
--- a/core/fpdfapi/page/cpdf_color.cpp
+++ b/core/fpdfapi/page/cpdf_color.cpp
@@ -146,6 +146,14 @@ void CPDF_Color::Copy(const CPDF_Color& src) {
pPattern->pattern_obj(), false, pPattern->parent_matrix());
}
+uint32_t CPDF_Color::CountComponents() const {
+ return m_pCS->CountComponents();
+}
+
+bool CPDF_Color::IsColorSpaceRGB() const {
+ return m_pCS == CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB);
+}
+
bool CPDF_Color::GetRGB(int* R, int* G, int* B) const {
if (!m_pCS || !m_pBuffer)
return false;