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/fx_ge.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 uint32_t fill_color, | 52 uint32_t fill_color, |
53 uint32_t stroke_color, | 53 uint32_t stroke_color, |
54 int fill_mode, | 54 int fill_mode, |
55 int blend_type) override; | 55 int blend_type) override; |
56 FX_BOOL SetPixel(int x, int y, uint32_t color) override; | 56 FX_BOOL SetPixel(int x, int y, uint32_t color) override; |
57 FX_BOOL FillRectWithBlend(const FX_RECT* pRect, | 57 FX_BOOL FillRectWithBlend(const FX_RECT* pRect, |
58 uint32_t fill_color, | 58 uint32_t fill_color, |
59 int blend_type) override; | 59 int blend_type) override; |
60 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 60 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
61 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override; | 61 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override; |
62 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; } | 62 CFX_DIBitmap* GetBackDrop() override; |
63 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 63 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
64 uint32_t color, | 64 uint32_t color, |
65 const FX_RECT* pSrcRect, | 65 const FX_RECT* pSrcRect, |
66 int left, | 66 int left, |
67 int top, | 67 int top, |
68 int blend_type) override; | 68 int blend_type) override; |
69 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 69 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
70 uint32_t color, | 70 uint32_t color, |
71 int dest_left, | 71 int dest_left, |
72 int dest_top, | 72 int dest_top, |
(...skipping 11 matching lines...) Expand all Loading... |
84 int blend_type) override; | 84 int blend_type) override; |
85 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; | 85 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; |
86 void CancelDIBits(void* handle) override; | 86 void CancelDIBits(void* handle) override; |
87 FX_BOOL DrawDeviceText(int nChars, | 87 FX_BOOL DrawDeviceText(int nChars, |
88 const FXTEXT_CHARPOS* pCharPos, | 88 const FXTEXT_CHARPOS* pCharPos, |
89 CFX_Font* pFont, | 89 CFX_Font* pFont, |
90 CFX_FontCache* pCache, | 90 CFX_FontCache* pCache, |
91 const CFX_Matrix* pObject2Device, | 91 const CFX_Matrix* pObject2Device, |
92 FX_FLOAT font_size, | 92 FX_FLOAT font_size, |
93 uint32_t color) override; | 93 uint32_t color) override; |
94 int GetDriverType() const override { return 1; } | 94 int GetDriverType() const override; |
95 | 95 |
96 FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, | 96 FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, |
97 uint32_t color, | 97 uint32_t color, |
98 FX_BOOL bFullCover, | 98 FX_BOOL bFullCover, |
99 FX_BOOL bGroupKnockout, | 99 FX_BOOL bGroupKnockout, |
100 int alpha_flag, | 100 int alpha_flag, |
101 void* pIccTransform); | 101 void* pIccTransform); |
102 | 102 |
103 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); | 103 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); |
104 | 104 |
105 virtual uint8_t* GetBuffer() const; | 105 virtual uint8_t* GetBuffer() const; |
106 const CFX_DIBitmap* GetBitmap() const { return m_pBitmap; } | 106 const CFX_DIBitmap* GetBitmap() const; |
107 | 107 |
108 private: | 108 private: |
109 CFX_DIBitmap* m_pBitmap; | 109 CFX_DIBitmap* m_pBitmap; |
110 CFX_ClipRgn* m_pClipRgn; | 110 CFX_ClipRgn* m_pClipRgn; |
111 CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack; | 111 CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack; |
112 void* m_pPlatformGraphics; | 112 void* m_pPlatformGraphics; |
113 void* m_pPlatformBitmap; | 113 void* m_pPlatformBitmap; |
114 void* m_pDwRenderTartget; | 114 void* m_pDwRenderTartget; |
115 int m_FillFlags; | 115 int m_FillFlags; |
116 FX_BOOL m_bRgbByteOrder; | 116 FX_BOOL m_bRgbByteOrder; |
117 CFX_DIBitmap* m_pOriDevice; | 117 CFX_DIBitmap* m_pOriDevice; |
118 FX_BOOL m_bGroupKnockout; | 118 FX_BOOL m_bGroupKnockout; |
119 }; | 119 }; |
120 | 120 |
121 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ | 121 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ |
OLD | NEW |