| 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/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 } | 99 } |
| 100 | 100 |
| 101 CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, | 101 CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, |
| 102 const CFX_Matrix& matrix) { | 102 const CFX_Matrix& matrix) { |
| 103 ShadingType type = pShading->GetShadingType(); | 103 ShadingType type = pShading->GetShadingType(); |
| 104 CPDF_Stream* pStream = ToStream(pShading->GetShadingObject()); | 104 CPDF_Stream* pStream = ToStream(pShading->GetShadingObject()); |
| 105 CPDF_ColorSpace* pCS = pShading->GetCS(); | 105 CPDF_ColorSpace* pCS = pShading->GetCS(); |
| 106 if (!pStream || !pCS) | 106 if (!pStream || !pCS) |
| 107 return CFX_FloatRect(0, 0, 0, 0); | 107 return CFX_FloatRect(0, 0, 0, 0); |
| 108 | 108 |
| 109 CPDF_MeshStream stream(pShading->GetFuncs(), pCS); | 109 CPDF_MeshStream stream(type, pShading->GetFuncs(), pStream, pCS); |
| 110 if (!stream.Load(pStream)) | 110 if (!stream.Load()) |
| 111 return CFX_FloatRect(0, 0, 0, 0); | 111 return CFX_FloatRect(0, 0, 0, 0); |
| 112 | 112 |
| 113 CFX_FloatRect rect; | 113 CFX_FloatRect rect; |
| 114 bool bStarted = false; | 114 bool bStarted = false; |
| 115 bool bGouraud = type == kFreeFormGouraudTriangleMeshShading || | 115 bool bGouraud = type == kFreeFormGouraudTriangleMeshShading || |
| 116 type == kLatticeFormGouraudTriangleMeshShading; | 116 type == kLatticeFormGouraudTriangleMeshShading; |
| 117 | 117 |
| 118 int point_count = kSingleCoordinatePair; | 118 int point_count = kSingleCoordinatePair; |
| 119 if (type == kTensorProductPatchMeshShading) | 119 if (type == kTensorProductPatchMeshShading) |
| 120 point_count = kTensorCoordinatePairs; | 120 point_count = kTensorCoordinatePairs; |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 } else { | 1696 } else { |
| 1697 PDF_ReplaceAbbr(pElement); | 1697 PDF_ReplaceAbbr(pElement); |
| 1698 } | 1698 } |
| 1699 } | 1699 } |
| 1700 break; | 1700 break; |
| 1701 } | 1701 } |
| 1702 default: | 1702 default: |
| 1703 break; | 1703 break; |
| 1704 } | 1704 } |
| 1705 } | 1705 } |
| OLD | NEW |