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