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_RENDER_CPDF_IMAGERENDERER_H_ | 7 #ifndef CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ |
8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ | 8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "core/fpdfapi/render/cpdf_imageloader.h" | 12 #include "core/fpdfapi/render/cpdf_imageloader.h" |
13 | 13 |
14 class CFX_FxgeDevice; | |
Tom Sepez
2016/11/28 18:42:53
nit: CFXGE_Device someday (since its in core/fxge)
npm
2016/11/28 20:51:30
Ok, will do later
| |
14 class CFX_ImageTransformer; | 15 class CFX_ImageTransformer; |
15 class CPDF_ImageObject; | 16 class CPDF_ImageObject; |
16 class CPDF_PageObject; | 17 class CPDF_PageObject; |
17 class CPDF_Pattern; | 18 class CPDF_Pattern; |
18 class CPDF_RenderStatus; | 19 class CPDF_RenderStatus; |
19 | 20 |
20 class CPDF_ImageRenderer { | 21 class CPDF_ImageRenderer { |
21 public: | 22 public: |
22 CPDF_ImageRenderer(); | 23 CPDF_ImageRenderer(); |
23 ~CPDF_ImageRenderer(); | 24 ~CPDF_ImageRenderer(); |
24 | 25 |
25 bool Start(CPDF_RenderStatus* pStatus, | 26 bool Start(CPDF_RenderStatus* pStatus, |
26 CPDF_PageObject* pObj, | 27 CPDF_PageObject* pObj, |
27 const CFX_Matrix* pObj2Device, | 28 const CFX_Matrix* pObj2Device, |
28 bool bStdCS, | 29 bool bStdCS, |
29 int blendType); | 30 int blendType); |
30 | 31 |
31 bool Start(CPDF_RenderStatus* pStatus, | 32 bool Start(CPDF_RenderStatus* pStatus, |
32 const CFX_DIBSource* pDIBSource, | 33 const CFX_DIBSource* pDIBSource, |
33 FX_ARGB bitmap_argb, | 34 FX_ARGB bitmap_argb, |
34 int bitmap_alpha, | 35 int bitmap_alpha, |
35 const CFX_Matrix* pImage2Device, | 36 const CFX_Matrix* pImage2Device, |
36 uint32_t flags, | 37 uint32_t flags, |
37 bool bStdCS, | 38 bool bStdCS, |
38 int blendType); | 39 int blendType); |
39 | 40 |
40 bool Continue(IFX_Pause* pPause); | 41 bool Continue(IFX_Pause* pPause); |
41 | 42 bool GetResult(); |
Tom Sepez
2016/11/28 18:42:53
nit: bool GetResult() const; if possible.
npm
2016/11/28 20:51:30
Done.
| |
42 bool m_Result; | |
43 | 43 |
44 private: | 44 private: |
45 bool StartBitmapAlpha(); | 45 bool StartBitmapAlpha(); |
46 bool StartDIBSource(); | 46 bool StartDIBSource(); |
47 bool StartRenderDIBSource(); | 47 bool StartRenderDIBSource(); |
48 bool StartLoadDIBSource(); | 48 bool StartLoadDIBSource(); |
49 bool DrawMaskedImage(); | 49 bool DrawMaskedImage(); |
50 bool DrawPatternImage(const CFX_Matrix* pObj2Device); | 50 bool DrawPatternImage(const CFX_Matrix* pObj2Device); |
51 bool NotDrawing(); | |
Tom Sepez
2016/11/28 18:42:53
nit: any of these new methods also const?
npm
2016/11/28 20:51:30
Done.
| |
52 FX_RECT GetDrawRect(); | |
53 CFX_Matrix GetDrawMatrix(const FX_RECT& rect); | |
54 void CalculateDrawImage(CFX_FxgeDevice* bitmap_device1, | |
55 CFX_FxgeDevice* bitmap_device2, | |
56 const CFX_DIBSource* pDIBSource, | |
57 CFX_Matrix* pNewMatrix, | |
58 const FX_RECT& rect); | |
51 | 59 |
52 CPDF_RenderStatus* m_pRenderStatus; | 60 CPDF_RenderStatus* m_pRenderStatus; |
53 CPDF_ImageObject* m_pImageObject; | 61 CPDF_ImageObject* m_pImageObject; |
54 int m_Status; | 62 int m_Status; |
55 const CFX_Matrix* m_pObj2Device; | 63 const CFX_Matrix* m_pObj2Device; |
56 CFX_Matrix m_ImageMatrix; | 64 CFX_Matrix m_ImageMatrix; |
57 CPDF_ImageLoader m_Loader; | 65 CPDF_ImageLoader m_Loader; |
58 const CFX_DIBSource* m_pDIBSource; | 66 const CFX_DIBSource* m_pDIBSource; |
59 std::unique_ptr<CFX_DIBitmap> m_pClone; | 67 std::unique_ptr<CFX_DIBitmap> m_pClone; |
60 int m_BitmapAlpha; | 68 int m_BitmapAlpha; |
61 bool m_bPatternColor; | 69 bool m_bPatternColor; |
62 CPDF_Pattern* m_pPattern; | 70 CPDF_Pattern* m_pPattern; |
63 FX_ARGB m_FillArgb; | 71 FX_ARGB m_FillArgb; |
64 uint32_t m_Flags; | 72 uint32_t m_Flags; |
65 std::unique_ptr<CFX_ImageTransformer> m_pTransformer; | 73 std::unique_ptr<CFX_ImageTransformer> m_pTransformer; |
66 void* m_DeviceHandle; | 74 void* m_DeviceHandle; |
67 bool m_bStdCS; | 75 bool m_bStdCS; |
68 int m_BlendType; | 76 int m_BlendType; |
77 bool m_Result; | |
69 }; | 78 }; |
70 | 79 |
71 #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ | 80 #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ |
OLD | NEW |