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 #ifndef CORE_FXGE_AGG_FX_AGG_DRIVER_H_ | 7 #ifndef CORE_FXGE_AGG_FX_AGG_DRIVER_H_ |
8 #define CORE_FXGE_AGG_FX_AGG_DRIVER_H_ | 8 #define CORE_FXGE_AGG_FX_AGG_DRIVER_H_ |
9 | 9 |
10 #include "core/fxge/include/fx_ge.h" | 10 #include "core/fxge/include/ifx_renderdevicedriver.h" |
11 #include "third_party/agg23/agg_clip_liang_barsky.h" | 11 #include "third_party/agg23/agg_clip_liang_barsky.h" |
12 #include "third_party/agg23/agg_path_storage.h" | 12 #include "third_party/agg23/agg_path_storage.h" |
13 #include "third_party/agg23/agg_rasterizer_scanline_aa.h" | 13 #include "third_party/agg23/agg_rasterizer_scanline_aa.h" |
14 | 14 |
| 15 class CFX_ClipRgn; |
15 class CFX_Matrix; | 16 class CFX_Matrix; |
16 class CFX_PathData; | 17 class CFX_PathData; |
17 | 18 |
18 class CAgg_PathData { | 19 class CAgg_PathData { |
19 public: | 20 public: |
20 CAgg_PathData() {} | 21 CAgg_PathData() {} |
21 ~CAgg_PathData() {} | 22 ~CAgg_PathData() {} |
22 void BuildPath(const CFX_PathData* pPathData, | 23 void BuildPath(const CFX_PathData* pPathData, |
23 const CFX_Matrix* pObject2Device); | 24 const CFX_Matrix* pObject2Device); |
24 | 25 |
25 agg::path_storage m_PathData; | 26 agg::path_storage m_PathData; |
26 }; | 27 }; |
27 | 28 |
28 class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { | 29 class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { |
29 public: | 30 public: |
30 CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, | 31 CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, |
31 FX_BOOL bRgbByteOrder, | 32 FX_BOOL bRgbByteOrder, |
32 CFX_DIBitmap* pOriDevice, | 33 CFX_DIBitmap* pOriDevice, |
33 FX_BOOL bGroupKnockout); | 34 FX_BOOL bGroupKnockout); |
34 ~CFX_AggDeviceDriver() override; | 35 ~CFX_AggDeviceDriver() override; |
35 | 36 |
36 void InitPlatform(); | 37 void InitPlatform(); |
37 void DestroyPlatform(); | 38 void DestroyPlatform(); |
38 | 39 |
39 // IFX_RenderDeviceDriver | 40 // IFX_RenderDeviceDriver |
40 int GetDeviceCaps(int caps_id) override; | 41 int GetDeviceCaps(int caps_id) const override; |
41 void SaveState() override; | 42 void SaveState() override; |
42 void RestoreState(bool bKeepSaved) override; | 43 void RestoreState(bool bKeepSaved) override; |
43 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 44 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
44 const CFX_Matrix* pObject2Device, | 45 const CFX_Matrix* pObject2Device, |
45 int fill_mode) override; | 46 int fill_mode) override; |
46 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 47 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
47 const CFX_Matrix* pObject2Device, | 48 const CFX_Matrix* pObject2Device, |
48 const CFX_GraphStateData* pGraphState) override; | 49 const CFX_GraphStateData* pGraphState) override; |
49 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 50 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
50 const CFX_Matrix* pObject2Device, | 51 const CFX_Matrix* pObject2Device, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void* m_pPlatformGraphics; | 113 void* m_pPlatformGraphics; |
113 void* m_pPlatformBitmap; | 114 void* m_pPlatformBitmap; |
114 void* m_pDwRenderTartget; | 115 void* m_pDwRenderTartget; |
115 int m_FillFlags; | 116 int m_FillFlags; |
116 FX_BOOL m_bRgbByteOrder; | 117 FX_BOOL m_bRgbByteOrder; |
117 CFX_DIBitmap* m_pOriDevice; | 118 CFX_DIBitmap* m_pOriDevice; |
118 FX_BOOL m_bGroupKnockout; | 119 FX_BOOL m_bGroupKnockout; |
119 }; | 120 }; |
120 | 121 |
121 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ | 122 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ |
OLD | NEW |