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

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

Issue 1426713002: 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
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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 SetGraphicStates(pObj, FALSE, FALSE, FALSE); 1144 SetGraphicStates(pObj, FALSE, FALSE, FALSE);
1145 pObj->m_Matrix = m_pCurStates->m_CTM; 1145 pObj->m_Matrix = m_pCurStates->m_CTM;
1146 pObj->m_Matrix.Concat(m_mtContentToUser); 1146 pObj->m_Matrix.Concat(m_mtContentToUser);
1147 CFX_FloatRect bbox; 1147 CFX_FloatRect bbox;
1148 if (!pObj->m_ClipPath.IsNull()) { 1148 if (!pObj->m_ClipPath.IsNull()) {
1149 bbox = pObj->m_ClipPath.GetClipBox(); 1149 bbox = pObj->m_ClipPath.GetClipBox();
1150 } else { 1150 } else {
1151 bbox = m_BBox; 1151 bbox = m_BBox;
1152 } 1152 }
1153 if (pShading->m_ShadingType >= 4) { 1153 if (pShading->m_ShadingType >= 4) {
1154 bbox.Intersect(_GetShadingBBox(ToStream(pShading->m_pShadingObj), 1154 bbox.Intersect(_GetShadingBBox(
1155 pShading->m_ShadingType, &pObj->m_Matrix, 1155 pShading->m_pShadingObj, pShading->m_ShadingType, &pObj->m_Matrix,
1156 pShading->m_pFunctions, pShading->m_nFuncs, 1156 pShading->m_pFunctions, pShading->m_nFuncs, pShading->m_pCS));
1157 pShading->m_pCS));
1158 } 1157 }
1159 pObj->m_Left = bbox.left; 1158 pObj->m_Left = bbox.left;
1160 pObj->m_Right = bbox.right; 1159 pObj->m_Right = bbox.right;
1161 pObj->m_Top = bbox.top; 1160 pObj->m_Top = bbox.top;
1162 pObj->m_Bottom = bbox.bottom; 1161 pObj->m_Bottom = bbox.bottom;
1163 m_pObjectList->m_ObjectList.AddTail(pObj); 1162 m_pObjectList->m_ObjectList.AddTail(pObj);
1164 } 1163 }
1165 void CPDF_StreamContentParser::Handle_SetCharSpace() { 1164 void CPDF_StreamContentParser::Handle_SetCharSpace() {
1166 m_pCurStates->m_TextState.GetModify()->m_CharSpace = GetNumber(0); 1165 m_pCurStates->m_TextState.GetModify()->m_CharSpace = GetNumber(0);
1167 } 1166 }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 buf.AppendChar((char)code); 1585 buf.AppendChar((char)code);
1587 } 1586 }
1588 bFirst = !bFirst; 1587 bFirst = !bFirst;
1589 } 1588 }
1590 } 1589 }
1591 if (!bFirst) { 1590 if (!bFirst) {
1592 buf.AppendChar((char)code); 1591 buf.AppendChar((char)code);
1593 } 1592 }
1594 return buf.GetByteString(); 1593 return buf.GetByteString();
1595 } 1594 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698