| 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 "../../../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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_pContext, m_pDevice, NULL, NULL, this, pStat
es, &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 delete pStates; |
| 998 delete pStates; | |
| 999 } | |
| 1000 return; | 998 return; |
| 1001 } | 999 } |
| 1002 if (bAligned) { | 1000 if (bAligned) { |
| 1003 int orig_x = FXSYS_round(mtPattern2Device.e); | 1001 int orig_x = FXSYS_round(mtPattern2Device.e); |
| 1004 int orig_y = FXSYS_round(mtPattern2Device.f); | 1002 int orig_y = FXSYS_round(mtPattern2Device.f); |
| 1005 min_col = (clip_box.left - orig_x) / width; | 1003 min_col = (clip_box.left - orig_x) / width; |
| 1006 if (clip_box.left < orig_x) { | 1004 if (clip_box.left < orig_x) { |
| 1007 min_col --; | 1005 min_col --; |
| 1008 } | 1006 } |
| 1009 max_col = (clip_box.right - orig_x) / width; | 1007 max_col = (clip_box.right - orig_x) / width; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 } | 1101 } |
| 1104 } | 1102 } |
| 1105 if(bStroke) { | 1103 if(bStroke) { |
| 1106 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); | 1104 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
| 1107 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN)
{ | 1105 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN)
{ |
| 1108 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1106 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
| 1109 bStroke = FALSE; | 1107 bStroke = FALSE; |
| 1110 } | 1108 } |
| 1111 } | 1109 } |
| 1112 } | 1110 } |
| OLD | NEW |