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

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp

Issue 522483003: Add m_pDocument in CPDF_Color and check if page date has been forced clear (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 3 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
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 "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "pageint.h" 8 #include "pageint.h"
9 9
10 CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix) : 10 CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix) :
11 m_pPatternObj(NULL), m_PatternType(PATTERN_TILING), m_pDocument(NULL), m_pCo lor(NULL) 11 m_pPatternObj(NULL), m_PatternType(PATTERN_TILING), m_pDocument(NULL)
12 { 12 {
13 if (pParentMatrix) { 13 if (pParentMatrix) {
14 m_ParentMatrix = *pParentMatrix; 14 m_ParentMatrix = *pParentMatrix;
15 } 15 }
16 } 16 }
17
18 CPDF_Pattern::~CPDF_Pattern() 17 CPDF_Pattern::~CPDF_Pattern()
19 { 18 {
20 if (m_pColor) {
21 m_pColor->SetValue(NULL, NULL, 0);
22 m_pColor = NULL;
23 }
24 } 19 }
25 CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, CPDF_Object* pPatter nObj, const CFX_AffineMatrix* parentMatrix) : 20 CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, CPDF_Object* pPatter nObj, const CFX_AffineMatrix* parentMatrix) :
26 CPDF_Pattern(parentMatrix) 21 CPDF_Pattern(parentMatrix)
27 { 22 {
28 m_PatternType = PATTERN_TILING; 23 m_PatternType = PATTERN_TILING;
29 m_pPatternObj = pPatternObj; 24 m_pPatternObj = pPatternObj;
30 m_pDocument = pDoc; 25 m_pDocument = pDoc;
31 CPDF_Dictionary* pDict = m_pPatternObj->GetDict(); 26 CPDF_Dictionary* pDict = m_pPatternObj->GetDict();
32 ASSERT(pDict != NULL); 27 ASSERT(pDict != NULL);
33 m_Pattern2Form = pDict->GetMatrix(FX_BSTRC("Matrix")); 28 m_Pattern2Form = pDict->GetMatrix(FX_BSTRC("Matrix"));
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 281 }
287 } 282 }
288 stream.m_BitStream.SkipBits(stream.m_nComps * stream.m_nCompBits * color _count); 283 stream.m_BitStream.SkipBits(stream.m_nComps * stream.m_nCompBits * color _count);
289 if (bGouraud) { 284 if (bGouraud) {
290 stream.m_BitStream.ByteAlign(); 285 stream.m_BitStream.ByteAlign();
291 } 286 }
292 } 287 }
293 rect.Transform(pMatrix); 288 rect.Transform(pMatrix);
294 return rect; 289 return rect;
295 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698