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/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
8 #include "../../../include/fxcodec/fx_codec.h" | 8 #include "../../../include/fxcodec/fx_codec.h" |
9 #include "../../../include/fpdfapi/fpdf_module.h" | 9 #include "../../../include/fpdfapi/fpdf_module.h" |
10 #include "../../../include/fpdfapi/fpdf_render.h" | 10 #include "../../../include/fpdfapi/fpdf_render.h" |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1075 return NULL; | 1075 return NULL; |
1076 } | 1076 } |
1077 #endif | 1077 #endif |
1078 CFX_DIBitmap& bitmap = *bitmap_device.GetBitmap(); | 1078 CFX_DIBitmap& bitmap = *bitmap_device.GetBitmap(); |
1079 CPDF_Object* pCSObj = NULL; | 1079 CPDF_Object* pCSObj = NULL; |
1080 CPDF_ColorSpace* pCS = NULL; | 1080 CPDF_ColorSpace* pCS = NULL; |
1081 if (bLuminosity) { | 1081 if (bLuminosity) { |
1082 CPDF_Array* pBC = pSMaskDict->GetArray(FX_BSTRC("BC")); | 1082 CPDF_Array* pBC = pSMaskDict->GetArray(FX_BSTRC("BC")); |
1083 FX_ARGB back_color = 0xff000000; | 1083 FX_ARGB back_color = 0xff000000; |
1084 if (pBC) { | 1084 if (pBC) { |
1085 pCSObj = pGroup->GetDict()->GetDict(FX_BSTRC("Group"))->GetElementVa lue(FX_BSTRC("CS")); | 1085 » » » CPDF_Dictionary* pDict = pGroup->GetDict(); |
Nico
2014/06/28 01:01:07
It looks like this file shouldn't have tabs either
| |
1086 » » » if (pDict && pDict->GetDict(FX_BSTRC("Group"))) | |
1087 » » » » pCSObj = pDict->GetDict(FX_BSTRC("Group"))->GetE lementValue(FX_BSTRC("CS")); | |
1088 » » » else | |
1089 » » » » pCSObj = NULL; | |
1086 pCS = m_pContext->m_pDocument->LoadColorSpace(pCSObj); | 1090 pCS = m_pContext->m_pDocument->LoadColorSpace(pCSObj); |
1087 if (pCS) { | 1091 if (pCS) { |
1088 FX_FLOAT R, G, B; | 1092 FX_FLOAT R, G, B; |
1089 FX_DWORD num_floats = 8; | 1093 FX_DWORD num_floats = 8; |
1090 if (pCS->CountComponents() > (FX_INT32)num_floats) { | 1094 if (pCS->CountComponents() > (FX_INT32)num_floats) { |
1091 num_floats = (FX_DWORD)pCS->CountComponents(); | 1095 num_floats = (FX_DWORD)pCS->CountComponents(); |
1092 } | 1096 } |
1093 CFX_FixedBufGrow<FX_FLOAT, 8> float_array(num_floats); | 1097 CFX_FixedBufGrow<FX_FLOAT, 8> float_array(num_floats); |
1094 FX_FLOAT* pFloats = float_array; | 1098 FX_FLOAT* pFloats = float_array; |
1095 FXSYS_memset32(pFloats, 0, num_floats * sizeof(FX_FLOAT)); | 1099 FXSYS_memset32(pFloats, 0, num_floats * sizeof(FX_FLOAT)); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1156 } | 1160 } |
1157 } else { | 1161 } else { |
1158 FXSYS_memcpy32(dest_buf, src_buf, dest_pitch * height); | 1162 FXSYS_memcpy32(dest_buf, src_buf, dest_pitch * height); |
1159 } | 1163 } |
1160 if (pFunc) { | 1164 if (pFunc) { |
1161 delete pFunc; | 1165 delete pFunc; |
1162 } | 1166 } |
1163 FX_Free(pTransfer); | 1167 FX_Free(pTransfer); |
1164 return pMask; | 1168 return pMask; |
1165 } | 1169 } |
OLD | NEW |