| 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 "../../../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 Loading... |
| 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 } |
| OLD | NEW |