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

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

Issue 1414283003: Revert "Make m_pShadingObj a CPDF_Stream instead of CPDF_Object." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fpdfapi/fpdf_serial.h" 9 #include "../../../include/fpdfapi/fpdf_serial.h"
10 #include "pageint.h" 10 #include "pageint.h"
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 SetGraphicStates(pObj, FALSE, FALSE, FALSE); 1121 SetGraphicStates(pObj, FALSE, FALSE, FALSE);
1122 pObj->m_Matrix = m_pCurStates->m_CTM; 1122 pObj->m_Matrix = m_pCurStates->m_CTM;
1123 pObj->m_Matrix.Concat(m_mtContentToUser); 1123 pObj->m_Matrix.Concat(m_mtContentToUser);
1124 CFX_FloatRect bbox; 1124 CFX_FloatRect bbox;
1125 if (!pObj->m_ClipPath.IsNull()) { 1125 if (!pObj->m_ClipPath.IsNull()) {
1126 bbox = pObj->m_ClipPath.GetClipBox(); 1126 bbox = pObj->m_ClipPath.GetClipBox();
1127 } else { 1127 } else {
1128 bbox = m_BBox; 1128 bbox = m_BBox;
1129 } 1129 }
1130 if (pShading->m_ShadingType >= 4) { 1130 if (pShading->m_ShadingType >= 4) {
1131 bbox.Intersect(_GetShadingBBox( 1131 bbox.Intersect(_GetShadingBBox(ToStream(pShading->m_pShadingObj),
1132 pShading->m_pShadingObj, pShading->m_ShadingType, &pObj->m_Matrix, 1132 pShading->m_ShadingType, &pObj->m_Matrix,
1133 pShading->m_pFunctions, pShading->m_nFuncs, pShading->m_pCS)); 1133 pShading->m_pFunctions, pShading->m_nFuncs,
1134 pShading->m_pCS));
1134 } 1135 }
1135 pObj->m_Left = bbox.left; 1136 pObj->m_Left = bbox.left;
1136 pObj->m_Right = bbox.right; 1137 pObj->m_Right = bbox.right;
1137 pObj->m_Top = bbox.top; 1138 pObj->m_Top = bbox.top;
1138 pObj->m_Bottom = bbox.bottom; 1139 pObj->m_Bottom = bbox.bottom;
1139 m_pObjectList->m_ObjectList.AddTail(pObj); 1140 m_pObjectList->m_ObjectList.AddTail(pObj);
1140 } 1141 }
1141 void CPDF_StreamContentParser::Handle_SetCharSpace() { 1142 void CPDF_StreamContentParser::Handle_SetCharSpace() {
1142 m_pCurStates->m_TextState.GetModify()->m_CharSpace = GetNumber(0); 1143 m_pCurStates->m_TextState.GetModify()->m_CharSpace = GetNumber(0);
1143 } 1144 }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 buf.AppendChar((char)code); 1563 buf.AppendChar((char)code);
1563 } 1564 }
1564 bFirst = !bFirst; 1565 bFirst = !bFirst;
1565 } 1566 }
1566 } 1567 }
1567 if (!bFirst) { 1568 if (!bFirst) {
1568 buf.AppendChar((char)code); 1569 buf.AppendChar((char)code);
1569 } 1570 }
1570 return buf.GetByteString(); 1571 return buf.GetByteString();
1571 } 1572 }
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