Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1577893002: Merge to XFA: Tidy up shading patterns (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_resource.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_resource.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698