| 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 "core/include/fpdfapi/fpdf_module.h" | 9 #include "core/include/fpdfapi/fpdf_module.h" |
| 10 #include "core/include/fpdfapi/fpdf_page.h" | 10 #include "core/include/fpdfapi/fpdf_page.h" |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 CPDF_ColorSpace* pCS); | 1095 CPDF_ColorSpace* pCS); |
| 1096 | 1096 |
| 1097 void CPDF_StreamContentParser::Handle_ShadeFill() { | 1097 void CPDF_StreamContentParser::Handle_ShadeFill() { |
| 1098 if (m_Options.m_bTextOnly) { | 1098 if (m_Options.m_bTextOnly) { |
| 1099 return; | 1099 return; |
| 1100 } | 1100 } |
| 1101 CPDF_Pattern* pPattern = FindPattern(GetString(0), TRUE); | 1101 CPDF_Pattern* pPattern = FindPattern(GetString(0), TRUE); |
| 1102 if (!pPattern) { | 1102 if (!pPattern) { |
| 1103 return; | 1103 return; |
| 1104 } | 1104 } |
| 1105 if (pPattern->m_PatternType != PATTERN_SHADING) { | 1105 if (pPattern->m_PatternType != CPDF_Pattern::SHADING) { |
| 1106 return; | 1106 return; |
| 1107 } | 1107 } |
| 1108 CPDF_ShadingPattern* pShading = (CPDF_ShadingPattern*)pPattern; | 1108 CPDF_ShadingPattern* pShading = static_cast<CPDF_ShadingPattern*>(pPattern); |
| 1109 if (!pShading->m_bShadingObj) { | 1109 if (!pShading->m_bShadingObj) { |
| 1110 return; | 1110 return; |
| 1111 } | 1111 } |
| 1112 if (!pShading->Load()) { | 1112 if (!pShading->Load()) { |
| 1113 return; | 1113 return; |
| 1114 } | 1114 } |
| 1115 CPDF_ShadingObject* pObj = new CPDF_ShadingObject; | 1115 CPDF_ShadingObject* pObj = new CPDF_ShadingObject; |
| 1116 pObj->m_pShading = pShading; | 1116 pObj->m_pShading = pShading; |
| 1117 SetGraphicStates(pObj, FALSE, FALSE, FALSE); | 1117 SetGraphicStates(pObj, FALSE, FALSE, FALSE); |
| 1118 pObj->m_Matrix = m_pCurStates->m_CTM; | 1118 pObj->m_Matrix = m_pCurStates->m_CTM; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 m_pObjectList->m_ObjectList.AddTail(pPathObj); | 1518 m_pObjectList->m_ObjectList.AddTail(pPathObj); |
| 1519 } | 1519 } |
| 1520 if (PathClipType) { | 1520 if (PathClipType) { |
| 1521 if (!matrix.IsIdentity()) { | 1521 if (!matrix.IsIdentity()) { |
| 1522 Path.Transform(&matrix); | 1522 Path.Transform(&matrix); |
| 1523 matrix.SetIdentity(); | 1523 matrix.SetIdentity(); |
| 1524 } | 1524 } |
| 1525 m_pCurStates->m_ClipPath.AppendPath(Path, PathClipType, TRUE); | 1525 m_pCurStates->m_ClipPath.AppendPath(Path, PathClipType, TRUE); |
| 1526 } | 1526 } |
| 1527 } | 1527 } |
| OLD | NEW |