OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/src/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/src/fpdfapi/fpdf_page/pageint.h" |
8 | 8 |
9 #include <limits.h> | 9 #include <limits.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 | 12 |
| 13 #include "core/include/fpdfapi/cpdf_array.h" |
| 14 #include "core/include/fpdfapi/cpdf_dictionary.h" |
13 #include "core/include/fpdfapi/cpdf_document.h" | 15 #include "core/include/fpdfapi/cpdf_document.h" |
| 16 #include "core/include/fpdfapi/cpdf_string.h" |
14 #include "core/include/fpdfapi/fpdf_module.h" | 17 #include "core/include/fpdfapi/fpdf_module.h" |
15 #include "core/include/fpdfapi/fpdf_page.h" | 18 #include "core/include/fpdfapi/fpdf_page.h" |
16 #include "core/include/fxcodec/fx_codec.h" | 19 #include "core/include/fxcodec/fx_codec.h" |
17 | 20 |
18 namespace { | 21 namespace { |
19 | 22 |
20 void sRGB_to_AdobeCMYK(FX_FLOAT R, | 23 void sRGB_to_AdobeCMYK(FX_FLOAT R, |
21 FX_FLOAT G, | 24 FX_FLOAT G, |
22 FX_FLOAT B, | 25 FX_FLOAT B, |
23 FX_FLOAT& c, | 26 FX_FLOAT& c, |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 if (!m_pBuffer || m_pCS->GetFamily() != PDFCS_PATTERN) { | 1541 if (!m_pBuffer || m_pCS->GetFamily() != PDFCS_PATTERN) { |
1539 return NULL; | 1542 return NULL; |
1540 } | 1543 } |
1541 PatternValue* pvalue = (PatternValue*)m_pBuffer; | 1544 PatternValue* pvalue = (PatternValue*)m_pBuffer; |
1542 return pvalue->m_nComps ? pvalue->m_Comps : NULL; | 1545 return pvalue->m_nComps ? pvalue->m_Comps : NULL; |
1543 } | 1546 } |
1544 FX_BOOL CPDF_Color::IsEqual(const CPDF_Color& other) const { | 1547 FX_BOOL CPDF_Color::IsEqual(const CPDF_Color& other) const { |
1545 return m_pCS && m_pCS == other.m_pCS && | 1548 return m_pCS && m_pCS == other.m_pCS && |
1546 FXSYS_memcmp(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0; | 1549 FXSYS_memcmp(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0; |
1547 } | 1550 } |
OLD | NEW |