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 <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 DrawTilingPattern(pTilingPattern, pPathObj, pObj2Device, bStroke); | 1179 DrawTilingPattern(pTilingPattern, pPathObj, pObj2Device, bStroke); |
1180 else if (CPDF_ShadingPattern* pShadingPattern = pattern->AsShadingPattern()) | 1180 else if (CPDF_ShadingPattern* pShadingPattern = pattern->AsShadingPattern()) |
1181 DrawShadingPattern(pShadingPattern, pPathObj, pObj2Device, bStroke); | 1181 DrawShadingPattern(pShadingPattern, pPathObj, pObj2Device, bStroke); |
1182 } | 1182 } |
1183 | 1183 |
1184 void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, | 1184 void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, |
1185 const CFX_Matrix* pObj2Device, | 1185 const CFX_Matrix* pObj2Device, |
1186 int& filltype, | 1186 int& filltype, |
1187 FX_BOOL& bStroke) { | 1187 FX_BOOL& bStroke) { |
1188 if (filltype) { | 1188 if (filltype) { |
1189 const CPDF_Color& FillColor = *pPathObj->m_ColorState->GetFillColor(); | 1189 const CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); |
1190 if (FillColor.IsPattern()) { | 1190 if (FillColor.IsPattern()) { |
1191 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); | 1191 DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); |
1192 filltype = 0; | 1192 filltype = 0; |
1193 } | 1193 } |
1194 } | 1194 } |
1195 if (bStroke) { | 1195 if (bStroke) { |
1196 const CPDF_Color& StrokeColor = *pPathObj->m_ColorState->GetStrokeColor(); | 1196 const CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
1197 if (StrokeColor.IsPattern()) { | 1197 if (StrokeColor.IsPattern()) { |
1198 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1198 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
1199 bStroke = FALSE; | 1199 bStroke = FALSE; |
1200 } | 1200 } |
1201 } | 1201 } |
1202 } | 1202 } |
OLD | NEW |