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_render.h" | 7 #include "../../../include/fpdfapi/fpdf_render.h" |
8 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
9 #include "../../../include/fxge/fx_ge.h" | 9 #include "../../../include/fxge/fx_ge.h" |
10 #include "../fpdf_page/pageint.h" | 10 #include "../fpdf_page/pageint.h" |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 { | 382 { |
383 ASSERT(pBitmap->GetFormat() == FXDIB_Argb); | 383 ASSERT(pBitmap->GetFormat() == FXDIB_Argb); |
384 if (pShadingStream->GetType() != PDFOBJ_STREAM) { | 384 if (pShadingStream->GetType() != PDFOBJ_STREAM) { |
385 return; | 385 return; |
386 } | 386 } |
387 CPDF_MeshStream stream; | 387 CPDF_MeshStream stream; |
388 if (!stream.Load(pShadingStream, pFuncs, nFuncs, pCS)) { | 388 if (!stream.Load(pShadingStream, pFuncs, nFuncs, pCS)) { |
389 return; | 389 return; |
390 } | 390 } |
391 CPDF_MeshVertex triangle[3]; | 391 CPDF_MeshVertex triangle[3]; |
| 392 FXSYS_memset32(triangle, 0, sizeof(triangle)); |
| 393 |
392 while (!stream.m_BitStream.IsEOF()) { | 394 while (!stream.m_BitStream.IsEOF()) { |
393 CPDF_MeshVertex vertex; | 395 CPDF_MeshVertex vertex; |
394 FX_DWORD flag = stream.GetVertex(vertex, pObject2Bitmap); | 396 FX_DWORD flag = stream.GetVertex(vertex, pObject2Bitmap); |
395 if (flag == 0) { | 397 if (flag == 0) { |
396 triangle[0] = vertex; | 398 triangle[0] = vertex; |
397 for (int j = 1; j < 3; j ++) { | 399 for (int j = 1; j < 3; j ++) { |
398 stream.GetVertex(triangle[j], pObject2Bitmap); | 400 stream.GetVertex(triangle[j], pObject2Bitmap); |
399 } | 401 } |
400 } else { | 402 } else { |
401 if (flag == 1) { | 403 if (flag == 1) { |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 bStroke = FALSE; | 1086 bStroke = FALSE; |
1085 bPattern = TRUE; | 1087 bPattern = TRUE; |
1086 } | 1088 } |
1087 } | 1089 } |
1088 #ifdef _FPDFAPI_MINI_ | 1090 #ifdef _FPDFAPI_MINI_ |
1089 if (bPattern && m_DitherBits) { | 1091 if (bPattern && m_DitherBits) { |
1090 DitherObjectArea(pPathObj, pObj2Device); | 1092 DitherObjectArea(pPathObj, pObj2Device); |
1091 } | 1093 } |
1092 #endif | 1094 #endif |
1093 } | 1095 } |
OLD | NEW |