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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 return; | 1088 return; |
1089 } | 1089 } |
1090 if(pattern->m_PatternType == PATTERN_TILING) { | 1090 if(pattern->m_PatternType == PATTERN_TILING) { |
1091 DrawTilingPattern((CPDF_TilingPattern*)pattern, pPathObj, pObj2Device, b
Stroke); | 1091 DrawTilingPattern((CPDF_TilingPattern*)pattern, pPathObj, pObj2Device, b
Stroke); |
1092 } else { | 1092 } else { |
1093 DrawShadingPattern((CPDF_ShadingPattern*)pattern, pPathObj, pObj2Device,
bStroke); | 1093 DrawShadingPattern((CPDF_ShadingPattern*)pattern, pPathObj, pObj2Device,
bStroke); |
1094 } | 1094 } |
1095 } | 1095 } |
1096 void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj, const CFX_
AffineMatrix* pObj2Device, int& filltype, FX_BOOL& bStroke) | 1096 void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj, const CFX_
AffineMatrix* pObj2Device, int& filltype, FX_BOOL& bStroke) |
1097 { | 1097 { |
1098 FX_BOOL bPattern = FALSE; | |
1099 if(filltype) { | 1098 if(filltype) { |
1100 CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); | 1099 CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); |
1101 if(FillColor.m_pCS && FillColor.m_pCS->GetFamily() == PDFCS_PATTERN) { | 1100 if(FillColor.m_pCS && FillColor.m_pCS->GetFamily() == PDFCS_PATTERN) { |
1102 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); | 1101 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); |
1103 filltype = 0; | 1102 filltype = 0; |
1104 bPattern = TRUE; | |
1105 } | 1103 } |
1106 } | 1104 } |
1107 if(bStroke) { | 1105 if(bStroke) { |
1108 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); | 1106 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
1109 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN)
{ | 1107 if(StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN)
{ |
1110 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1108 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
1111 bStroke = FALSE; | 1109 bStroke = FALSE; |
1112 bPattern = TRUE; | |
1113 } | 1110 } |
1114 } | 1111 } |
1115 } | 1112 } |
OLD | NEW |