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 "../../../include/fpdfapi/fpdf_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
10 #include "pageint.h" | 10 #include "pageint.h" |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 } | 938 } |
939 int nComps = m_pAltCS->CountComponents(); | 939 int nComps = m_pAltCS->CountComponents(); |
940 CFX_FixedBufGrow<FX_FLOAT, 16> results(nComps); | 940 CFX_FixedBufGrow<FX_FLOAT, 16> results(nComps); |
941 for (int i = 0; i < nComps; i ++) { | 941 for (int i = 0; i < nComps; i ++) { |
942 results[i] = *pBuf; | 942 results[i] = *pBuf; |
943 } | 943 } |
944 m_pAltCS->GetRGB(results, R, G, B); | 944 m_pAltCS->GetRGB(results, R, G, B); |
945 return TRUE; | 945 return TRUE; |
946 } | 946 } |
947 CFX_FixedBufGrow<FX_FLOAT, 16> results(m_pFunc->CountOutputs()); | 947 CFX_FixedBufGrow<FX_FLOAT, 16> results(m_pFunc->CountOutputs()); |
948 int nresults; | 948 int nresults = 0; |
949 m_pFunc->Call(pBuf, 1, results, nresults); | 949 m_pFunc->Call(pBuf, 1, results, nresults); |
950 if (nresults == 0) { | 950 if (nresults == 0) { |
951 return FALSE; | 951 return FALSE; |
952 } | 952 } |
953 if (m_pAltCS) { | 953 if (m_pAltCS) { |
954 m_pAltCS->GetRGB(results, R, G, B); | 954 m_pAltCS->GetRGB(results, R, G, B); |
955 return TRUE; | 955 return TRUE; |
956 } else { | 956 } else { |
957 R = G = B = 0; | 957 R = G = B = 0; |
958 return FALSE; | 958 return FALSE; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 PatternValue* pvalue = (PatternValue*)m_pBuffer; | 1393 PatternValue* pvalue = (PatternValue*)m_pBuffer; |
1394 return pvalue->m_nComps ? pvalue->m_Comps : NULL; | 1394 return pvalue->m_nComps ? pvalue->m_Comps : NULL; |
1395 } | 1395 } |
1396 FX_BOOL CPDF_Color::IsEqual(const CPDF_Color& other) const | 1396 FX_BOOL CPDF_Color::IsEqual(const CPDF_Color& other) const |
1397 { | 1397 { |
1398 if (m_pCS != other.m_pCS || m_pCS == NULL) { | 1398 if (m_pCS != other.m_pCS || m_pCS == NULL) { |
1399 return FALSE; | 1399 return FALSE; |
1400 } | 1400 } |
1401 return FXSYS_memcmp32(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0; | 1401 return FXSYS_memcmp32(m_pBuffer, other.m_pBuffer, m_pCS->GetBufSize()) == 0; |
1402 } | 1402 } |
OLD | NEW |