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 "core/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/fpdfapi/fpdf_render/render_int.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" | 9 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" |
10 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h" | 10 #include "core/fpdfapi/fpdf_page/cpdf_meshstream.h" |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 else if (CPDF_ShadingPattern* pShadingPattern = pattern->AsShadingPattern()) | 1204 else if (CPDF_ShadingPattern* pShadingPattern = pattern->AsShadingPattern()) |
1205 DrawShadingPattern(pShadingPattern, pPathObj, pObj2Device, bStroke); | 1205 DrawShadingPattern(pShadingPattern, pPathObj, pObj2Device, bStroke); |
1206 } | 1206 } |
1207 | 1207 |
1208 void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, | 1208 void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, |
1209 const CFX_Matrix* pObj2Device, | 1209 const CFX_Matrix* pObj2Device, |
1210 int& filltype, | 1210 int& filltype, |
1211 FX_BOOL& bStroke) { | 1211 FX_BOOL& bStroke) { |
1212 if (filltype) { | 1212 if (filltype) { |
1213 CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); | 1213 CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); |
1214 if (FillColor.m_pCS && FillColor.m_pCS->GetFamily() == PDFCS_PATTERN) { | 1214 if (FillColor.IsPattern()) { |
1215 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); | 1215 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); |
1216 filltype = 0; | 1216 filltype = 0; |
1217 } | 1217 } |
1218 } | 1218 } |
1219 if (bStroke) { | 1219 if (bStroke) { |
1220 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); | 1220 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
1221 if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { | 1221 if (StrokeColor.IsPattern()) { |
1222 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1222 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
1223 bStroke = FALSE; | 1223 bStroke = FALSE; |
1224 } | 1224 } |
1225 } | 1225 } |
1226 } | 1226 } |
OLD | NEW |