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