OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/page/cpdf_tilingpattern.h" | 7 #include "core/fpdfapi/page/cpdf_tilingpattern.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" | |
10 #include "core/fpdfapi/fpdf_parser/cpdf_object.h" | |
11 #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" | |
12 #include "core/fpdfapi/page/cpdf_form.h" | 9 #include "core/fpdfapi/page/cpdf_form.h" |
| 10 #include "core/fpdfapi/parser/cpdf_dictionary.h" |
| 11 #include "core/fpdfapi/parser/cpdf_object.h" |
| 12 #include "core/fpdfapi/parser/cpdf_stream.h" |
13 | 13 |
14 CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, | 14 CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc, |
15 CPDF_Object* pPatternObj, | 15 CPDF_Object* pPatternObj, |
16 const CFX_Matrix& parentMatrix) | 16 const CFX_Matrix& parentMatrix) |
17 : CPDF_Pattern(TILING, pDoc, pPatternObj, parentMatrix) { | 17 : CPDF_Pattern(TILING, pDoc, pPatternObj, parentMatrix) { |
18 CPDF_Dictionary* pDict = m_pPatternObj->GetDict(); | 18 CPDF_Dictionary* pDict = m_pPatternObj->GetDict(); |
19 m_Pattern2Form = pDict->GetMatrixFor("Matrix"); | 19 m_Pattern2Form = pDict->GetMatrixFor("Matrix"); |
20 m_bColored = pDict->GetIntegerFor("PaintType") == 1; | 20 m_bColored = pDict->GetIntegerFor("PaintType") == 1; |
21 m_Pattern2Form.Concat(parentMatrix); | 21 m_Pattern2Form.Concat(parentMatrix); |
22 } | 22 } |
(...skipping 22 matching lines...) Expand all Loading... |
45 | 45 |
46 CPDF_Stream* pStream = m_pPatternObj->AsStream(); | 46 CPDF_Stream* pStream = m_pPatternObj->AsStream(); |
47 if (!pStream) | 47 if (!pStream) |
48 return FALSE; | 48 return FALSE; |
49 | 49 |
50 m_pForm.reset(new CPDF_Form(m_pDocument, nullptr, pStream)); | 50 m_pForm.reset(new CPDF_Form(m_pDocument, nullptr, pStream)); |
51 m_pForm->ParseContent(nullptr, &m_ParentMatrix, nullptr); | 51 m_pForm->ParseContent(nullptr, &m_ParentMatrix, nullptr); |
52 m_BBox = pDict->GetRectFor("BBox"); | 52 m_BBox = pDict->GetRectFor("BBox"); |
53 return TRUE; | 53 return TRUE; |
54 } | 54 } |
OLD | NEW |