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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp

Issue 893493002: Merge to XFA: Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 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
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_render.h" 7 #include "../../../include/fpdfapi/fpdf_render.h"
8 #include "../../../include/fpdfapi/fpdf_pageobj.h" 8 #include "../../../include/fpdfapi/fpdf_pageobj.h"
9 #include "../../../include/fxge/fx_ge.h" 9 #include "../../../include/fxge/fx_ge.h"
10 #include "../fpdf_page/pageint.h" 10 #include "../fpdf_page/pageint.h"
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 for (int col = min_col; col <= max_col; col ++) 981 for (int col = min_col; col <= max_col; col ++)
982 for (int row = min_row; row <= max_row; row ++) { 982 for (int row = min_row; row <= max_row; row ++) {
983 FX_FLOAT orig_x, orig_y; 983 FX_FLOAT orig_x, orig_y;
984 orig_x = col * pPattern->m_XStep; 984 orig_x = col * pPattern->m_XStep;
985 orig_y = row * pPattern->m_YStep; 985 orig_y = row * pPattern->m_YStep;
986 mtPattern2Device.Transform(orig_x, orig_y); 986 mtPattern2Device.Transform(orig_x, orig_y);
987 CFX_AffineMatrix matrix = *pObj2Device; 987 CFX_AffineMatrix matrix = *pObj2Device;
988 matrix.Translate(orig_x - mtPattern2Device.e, orig_y - mtPattern 2Device.f); 988 matrix.Translate(orig_x - mtPattern2Device.e, orig_y - mtPattern 2Device.f);
989 m_pDevice->SaveState(); 989 m_pDevice->SaveState();
990 CPDF_RenderStatus status; 990 CPDF_RenderStatus status;
991 status.Initialize(m_Level + 1, m_pContext, m_pDevice, NULL, NULL , this, pStates, &m_Options, 991 status.Initialize(m_pContext, m_pDevice, NULL, NULL, this, pStat es, &m_Options,
992 pPattern->m_pForm->m_Transparency, m_bDropObje cts, pFormResource); 992 pPattern->m_pForm->m_Transparency, m_bDropObje cts, pFormResource);
993 status.RenderObjectList(pPattern->m_pForm, &matrix); 993 status.RenderObjectList(pPattern->m_pForm, &matrix);
994 m_pDevice->RestoreState(); 994 m_pDevice->RestoreState();
995 } 995 }
996 m_pDevice->RestoreState(); 996 m_pDevice->RestoreState();
997 if (pStates) { 997 if (pStates) {
998 delete pStates; 998 delete pStates;
999 } 999 }
1000 return; 1000 return;
1001 } 1001 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 } 1106 }
1107 if(bStroke) { 1107 if(bStroke) {
1108 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); 1108 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor();
1109 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { 1109 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) {
1110 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); 1110 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE);
1111 bStroke = FALSE; 1111 bStroke = FALSE;
1112 bPattern = TRUE; 1112 bPattern = TRUE;
1113 } 1113 }
1114 } 1114 }
1115 } 1115 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698