summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-11 12:59:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-11 12:59:17 -0700
commita244dfe2ba2cc82ee264475253cc16222e022524 (patch)
tree3a69928e3c60c5c6f91813aa07518b1af481754b /core/fpdfapi/fpdf_render
parent35c2100a5f6a466635bf99b4e7117d23aeb54d2c (diff)
downloadpdfium-a244dfe2ba2cc82ee264475253cc16222e022524.tar.xz
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
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}