From a244dfe2ba2cc82ee264475253cc16222e022524 Mon Sep 17 00:00:00 2001 From: thestig Date: Wed, 11 May 2016 12:59:16 -0700 Subject: Clean up CPDF_Color and some related code. - Remove dead code in CPDF_Color. - Encapsulate member variables. - Added accessors as need. - Remove unused CPDF_ColorSpace::GetMaxIndex(). - Remove redundent CPDF_StreamContentParser::GetNumber16(). Review-Url: https://codereview.chromium.org/1965243002 --- core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_render') diff --git a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index 0af1175c8e..ef604ec70f 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -1211,14 +1211,14 @@ void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, FX_BOOL& bStroke) { if (filltype) { CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor(); - if (FillColor.m_pCS && FillColor.m_pCS->GetFamily() == PDFCS_PATTERN) { + if (FillColor.IsPattern()) { DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, FALSE); filltype = 0; } } if (bStroke) { CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); - if (StrokeColor.m_pCS && StrokeColor.m_pCS->GetFamily() == PDFCS_PATTERN) { + if (StrokeColor.IsPattern()) { DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); bStroke = FALSE; } -- cgit v1.2.3