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

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

Issue 1965243002: Clean up CPDF_Color and some related code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « core/fpdfapi/fpdf_page/pageint.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/pageint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698