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_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ |
8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ | 8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 FX_BOOL LoadImageF(CPDF_Stream* pImageStream, FX_BOOL bInline); | 33 FX_BOOL LoadImageF(CPDF_Stream* pImageStream, FX_BOOL bInline); |
34 | 34 |
35 void Release(); | 35 void Release(); |
36 | 36 |
37 CPDF_Image* Clone(); | 37 CPDF_Image* Clone(); |
38 | 38 |
39 CPDF_Dictionary* GetInlineDict() const { return m_pInlineDict; } | 39 CPDF_Dictionary* GetInlineDict() const { return m_pInlineDict; } |
40 CPDF_Stream* GetStream() const { return m_pStream; } | 40 CPDF_Stream* GetStream() const { return m_pStream; } |
41 CPDF_Dictionary* GetDict() const { | 41 CPDF_Dictionary* GetDict() const { |
42 return m_pStream ? m_pStream->GetDict() : NULL; | 42 return m_pStream ? m_pStream->GetDict() : nullptr; |
43 } | 43 } |
44 CPDF_Dictionary* GetOC() const { return m_pOC; } | 44 CPDF_Dictionary* GetOC() const { return m_pOC; } |
45 CPDF_Document* GetDocument() const { return m_pDocument; } | 45 CPDF_Document* GetDocument() const { return m_pDocument; } |
46 | 46 |
47 int32_t GetPixelHeight() const { return m_Height; } | 47 int32_t GetPixelHeight() const { return m_Height; } |
48 int32_t GetPixelWidth() const { return m_Width; } | 48 int32_t GetPixelWidth() const { return m_Width; } |
49 | 49 |
50 FX_BOOL IsInline() { return m_bInline; } | 50 FX_BOOL IsInline() { return m_bInline; } |
51 FX_BOOL IsMask() const { return m_bIsMask; } | 51 FX_BOOL IsMask() const { return m_bIsMask; } |
52 FX_BOOL IsInterpol() const { return m_bInterpolate; } | 52 FX_BOOL IsInterpol() const { return m_bInterpolate; } |
53 | 53 |
54 CFX_DIBSource* LoadDIBSource(CFX_DIBSource** ppMask = NULL, | 54 CFX_DIBSource* LoadDIBSource(CFX_DIBSource** ppMask = nullptr, |
55 uint32_t* pMatteColor = NULL, | 55 uint32_t* pMatteColor = nullptr, |
56 FX_BOOL bStdCS = FALSE, | 56 FX_BOOL bStdCS = FALSE, |
57 uint32_t GroupFamily = 0, | 57 uint32_t GroupFamily = 0, |
58 FX_BOOL bLoadMask = FALSE) const; | 58 FX_BOOL bLoadMask = FALSE) const; |
59 | 59 |
60 void SetInlineDict(CPDF_Dictionary* pDict) { m_pInlineDict = pDict; } | 60 void SetInlineDict(CPDF_Dictionary* pDict) { m_pInlineDict = pDict; } |
61 void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress); | 61 void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress); |
62 void SetJpegImage(uint8_t* pImageData, uint32_t size); | 62 void SetJpegImage(uint8_t* pImageData, uint32_t size); |
63 void SetJpegImage(IFX_FileRead* pFile); | 63 void SetJpegImage(IFX_FileRead* pFile); |
64 | 64 |
65 void ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap); | 65 void ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap); |
(...skipping 19 matching lines...) Expand all Loading... |
85 CPDF_Dictionary* m_pInlineDict; | 85 CPDF_Dictionary* m_pInlineDict; |
86 int32_t m_Height; | 86 int32_t m_Height; |
87 int32_t m_Width; | 87 int32_t m_Width; |
88 FX_BOOL m_bIsMask; | 88 FX_BOOL m_bIsMask; |
89 FX_BOOL m_bInterpolate; | 89 FX_BOOL m_bInterpolate; |
90 CPDF_Document* m_pDocument; | 90 CPDF_Document* m_pDocument; |
91 CPDF_Dictionary* m_pOC; | 91 CPDF_Dictionary* m_pOC; |
92 }; | 92 }; |
93 | 93 |
94 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ | 94 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_IMAGE_H_ |
OLD | NEW |