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 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "core/fpdfapi/parser/cpdf_stream.h" | 12 #include "core/fpdfapi/parser/cpdf_stream.h" |
13 #include "core/fxcrt/fx_system.h" | 13 #include "core/fxcrt/fx_system.h" |
14 | 14 |
15 class CFX_DIBSource; | 15 class CFX_DIBSource; |
16 class CFX_DIBitmap; | 16 class CFX_DIBitmap; |
17 class CPDF_Document; | 17 class CPDF_Document; |
18 class CPDF_Page; | 18 class CPDF_Page; |
19 class IFX_Pause; | 19 class IFX_Pause; |
20 class IFX_SeekableReadStream; | 20 class IFX_SeekableReadStream; |
21 | 21 |
22 class CPDF_Image { | 22 class CPDF_Image { |
23 public: | 23 public: |
24 explicit CPDF_Image(CPDF_Document* pDoc); | 24 explicit CPDF_Image(CPDF_Document* pDoc); |
25 CPDF_Image(CPDF_Document* pDoc, std::unique_ptr<CPDF_Stream> pStream); | 25 CPDF_Image(CPDF_Document* pDoc, std::unique_ptr<CPDF_Stream> pStream); |
26 CPDF_Image(CPDF_Document* pDoc, uint32_t dwStreamObjNum); | 26 CPDF_Image(CPDF_Document* pDoc, uint32_t dwStreamObjNum); |
27 ~CPDF_Image(); | 27 ~CPDF_Image(); |
28 | 28 |
29 CPDF_Image* Clone(); | |
30 void ConvertStreamToIndirectObject(); | 29 void ConvertStreamToIndirectObject(); |
31 | 30 |
32 CPDF_Dictionary* GetInlineDict() const { return m_pDict; } | 31 CPDF_Dictionary* GetInlineDict() const { return m_pDict; } |
33 CPDF_Stream* GetStream() const { return m_pStream; } | 32 CPDF_Stream* GetStream() const { return m_pStream; } |
34 CPDF_Dictionary* GetDict() const { | 33 CPDF_Dictionary* GetDict() const { |
35 return m_pStream ? m_pStream->GetDict() : nullptr; | 34 return m_pStream ? m_pStream->GetDict() : nullptr; |
36 } | 35 } |
37 CPDF_Dictionary* GetOC() const { return m_pOC; } | 36 CPDF_Dictionary* GetOC() const { return m_pOC; } |
38 CPDF_Document* GetDocument() const { return m_pDocument; } | 37 CPDF_Document* GetDocument() const { return m_pDocument; } |
39 | 38 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 bool m_bInterpolate = false; | 78 bool m_bInterpolate = false; |
80 CPDF_Document* const m_pDocument; | 79 CPDF_Document* const m_pDocument; |
81 CPDF_Stream* m_pStream = nullptr; | 80 CPDF_Stream* m_pStream = nullptr; |
82 CPDF_Dictionary* m_pDict = nullptr; | 81 CPDF_Dictionary* m_pDict = nullptr; |
83 std::unique_ptr<CPDF_Stream> m_pOwnedStream; | 82 std::unique_ptr<CPDF_Stream> m_pOwnedStream; |
84 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict; | 83 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict; |
85 CPDF_Dictionary* m_pOC = nullptr; | 84 CPDF_Dictionary* m_pOC = nullptr; |
86 }; | 85 }; |
87 | 86 |
88 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 87 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
OLD | NEW |