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/include/fxge/fx_ge.h" | 10 #include "core/include/fxge/fx_ge.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void RestoreState(FX_BOOL bKeepSaved) override; | 43 void RestoreState(FX_BOOL bKeepSaved) override; |
44 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 44 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
45 const CFX_Matrix* pObject2Device, | 45 const CFX_Matrix* pObject2Device, |
46 int fill_mode) override; | 46 int fill_mode) override; |
47 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 47 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
48 const CFX_Matrix* pObject2Device, | 48 const CFX_Matrix* pObject2Device, |
49 const CFX_GraphStateData* pGraphState) override; | 49 const CFX_GraphStateData* pGraphState) override; |
50 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 50 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
51 const CFX_Matrix* pObject2Device, | 51 const CFX_Matrix* pObject2Device, |
52 const CFX_GraphStateData* pGraphState, | 52 const CFX_GraphStateData* pGraphState, |
53 FX_DWORD fill_color, | 53 uint32_t fill_color, |
54 FX_DWORD stroke_color, | 54 uint32_t stroke_color, |
55 int fill_mode, | 55 int fill_mode, |
56 int alpha_flag, | 56 int alpha_flag, |
57 void* pIccTransform, | 57 void* pIccTransform, |
58 int blend_type) override; | 58 int blend_type) override; |
59 FX_BOOL SetPixel(int x, | 59 FX_BOOL SetPixel(int x, |
60 int y, | 60 int y, |
61 FX_DWORD color, | 61 uint32_t color, |
62 int alpha_flag, | 62 int alpha_flag, |
63 void* pIccTransform) override; | 63 void* pIccTransform) override; |
64 FX_BOOL FillRect(const FX_RECT* pRect, | 64 FX_BOOL FillRect(const FX_RECT* pRect, |
65 FX_DWORD fill_color, | 65 uint32_t fill_color, |
66 int alpha_flag, | 66 int alpha_flag, |
67 void* pIccTransform, | 67 void* pIccTransform, |
68 int blend_type) override; | 68 int blend_type) override; |
69 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 69 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
70 FX_FLOAT y1, | 70 FX_FLOAT y1, |
71 FX_FLOAT x2, | 71 FX_FLOAT x2, |
72 FX_FLOAT y2, | 72 FX_FLOAT y2, |
73 FX_DWORD color, | 73 uint32_t color, |
74 int alpha_flag, | 74 int alpha_flag, |
75 void* pIccTransform, | 75 void* pIccTransform, |
76 int blend_type) override { | 76 int blend_type) override { |
77 return FALSE; | 77 return FALSE; |
78 } | 78 } |
79 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 79 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
80 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 80 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
81 int left, | 81 int left, |
82 int top, | 82 int top, |
83 void* pIccTransform = NULL, | 83 void* pIccTransform = NULL, |
84 FX_BOOL bDEdge = FALSE) override; | 84 FX_BOOL bDEdge = FALSE) override; |
85 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; } | 85 CFX_DIBitmap* GetBackDrop() override { return m_pOriDevice; } |
86 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 86 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
87 FX_DWORD color, | 87 uint32_t color, |
88 const FX_RECT* pSrcRect, | 88 const FX_RECT* pSrcRect, |
89 int left, | 89 int left, |
90 int top, | 90 int top, |
91 int blend_type, | 91 int blend_type, |
92 int alpha_flag, | 92 int alpha_flag, |
93 void* pIccTransform) override; | 93 void* pIccTransform) override; |
94 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 94 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
95 FX_DWORD color, | 95 uint32_t color, |
96 int dest_left, | 96 int dest_left, |
97 int dest_top, | 97 int dest_top, |
98 int dest_width, | 98 int dest_width, |
99 int dest_height, | 99 int dest_height, |
100 const FX_RECT* pClipRect, | 100 const FX_RECT* pClipRect, |
101 FX_DWORD flags, | 101 uint32_t flags, |
102 int alpha_flag, | 102 int alpha_flag, |
103 void* pIccTransform, | 103 void* pIccTransform, |
104 int blend_type) override; | 104 int blend_type) override; |
105 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 105 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
106 int bitmap_alpha, | 106 int bitmap_alpha, |
107 FX_DWORD color, | 107 uint32_t color, |
108 const CFX_Matrix* pMatrix, | 108 const CFX_Matrix* pMatrix, |
109 FX_DWORD flags, | 109 uint32_t flags, |
110 void*& handle, | 110 void*& handle, |
111 int alpha_flag, | 111 int alpha_flag, |
112 void* pIccTransform, | 112 void* pIccTransform, |
113 int blend_type) override; | 113 int blend_type) override; |
114 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; | 114 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override; |
115 void CancelDIBits(void* handle) override; | 115 void CancelDIBits(void* handle) override; |
116 FX_BOOL DrawDeviceText(int nChars, | 116 FX_BOOL DrawDeviceText(int nChars, |
117 const FXTEXT_CHARPOS* pCharPos, | 117 const FXTEXT_CHARPOS* pCharPos, |
118 CFX_Font* pFont, | 118 CFX_Font* pFont, |
119 CFX_FontCache* pCache, | 119 CFX_FontCache* pCache, |
120 const CFX_Matrix* pObject2Device, | 120 const CFX_Matrix* pObject2Device, |
121 FX_FLOAT font_size, | 121 FX_FLOAT font_size, |
122 FX_DWORD color, | 122 uint32_t color, |
123 int alpha_flag, | 123 int alpha_flag, |
124 void* pIccTransform) override; | 124 void* pIccTransform) override; |
125 int GetDriverType() const override { return 1; } | 125 int GetDriverType() const override { return 1; } |
126 | 126 |
127 FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, | 127 FX_BOOL RenderRasterizer(agg::rasterizer_scanline_aa& rasterizer, |
128 FX_DWORD color, | 128 uint32_t color, |
129 FX_BOOL bFullCover, | 129 FX_BOOL bFullCover, |
130 FX_BOOL bGroupKnockout, | 130 FX_BOOL bGroupKnockout, |
131 int alpha_flag, | 131 int alpha_flag, |
132 void* pIccTransform); | 132 void* pIccTransform); |
133 | 133 |
134 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); | 134 void SetClipMask(agg::rasterizer_scanline_aa& rasterizer); |
135 | 135 |
136 virtual uint8_t* GetBuffer() const; | 136 virtual uint8_t* GetBuffer() const; |
137 const CFX_DIBitmap* GetBitmap() const { return m_pBitmap; } | 137 const CFX_DIBitmap* GetBitmap() const { return m_pBitmap; } |
138 | 138 |
139 private: | 139 private: |
140 CFX_DIBitmap* m_pBitmap; | 140 CFX_DIBitmap* m_pBitmap; |
141 CFX_ClipRgn* m_pClipRgn; | 141 CFX_ClipRgn* m_pClipRgn; |
142 CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack; | 142 CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack; |
143 void* m_pPlatformGraphics; | 143 void* m_pPlatformGraphics; |
144 void* m_pPlatformBitmap; | 144 void* m_pPlatformBitmap; |
145 void* m_pDwRenderTartget; | 145 void* m_pDwRenderTartget; |
146 int m_FillFlags; | 146 int m_FillFlags; |
147 int m_DitherBits; | 147 int m_DitherBits; |
148 FX_BOOL m_bRgbByteOrder; | 148 FX_BOOL m_bRgbByteOrder; |
149 CFX_DIBitmap* m_pOriDevice; | 149 CFX_DIBitmap* m_pOriDevice; |
150 FX_BOOL m_bGroupKnockout; | 150 FX_BOOL m_bGroupKnockout; |
151 }; | 151 }; |
152 | 152 |
153 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ | 153 #endif // CORE_FXGE_AGG_FX_AGG_DRIVER_H_ |
OLD | NEW |