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_WIN32_WIN32_INT_H_ | 7 #ifndef CORE_FXGE_WIN32_WIN32_INT_H_ |
8 #define CORE_FXGE_WIN32_WIN32_INT_H_ | 8 #define CORE_FXGE_WIN32_WIN32_INT_H_ |
9 | 9 |
10 #include "core/fxge/include/fx_ge.h" | 10 #include "core/fxge/include/fx_ge.h" |
11 #include "core/fxge/win32/dwrite_int.h" | 11 #include "core/fxge/win32/dwrite_int.h" |
12 | 12 |
13 struct WINDIB_Open_Args_; | 13 struct WINDIB_Open_Args_; |
14 class CGdiplusExt { | 14 class CGdiplusExt { |
15 public: | 15 public: |
16 CGdiplusExt(); | 16 CGdiplusExt(); |
17 ~CGdiplusExt(); | 17 ~CGdiplusExt(); |
18 void Load(); | 18 void Load(); |
19 FX_BOOL IsAvailable() { return m_hModule != NULL; } | 19 FX_BOOL IsAvailable() { return !!m_hModule; } |
20 FX_BOOL StretchBitMask(HDC hDC, | 20 FX_BOOL StretchBitMask(HDC hDC, |
21 BOOL bMonoDevice, | 21 BOOL bMonoDevice, |
22 const CFX_DIBitmap* pBitmap, | 22 const CFX_DIBitmap* pBitmap, |
23 int dest_left, | 23 int dest_left, |
24 int dest_top, | 24 int dest_top, |
25 int dest_width, | 25 int dest_width, |
26 int dest_height, | 26 int dest_height, |
27 uint32_t argb, | 27 uint32_t argb, |
28 const FX_RECT* pClipRect, | 28 const FX_RECT* pClipRect, |
29 int flags); | 29 int flags); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 }; | 181 }; |
182 | 182 |
183 class CGdiDisplayDriver : public CGdiDeviceDriver { | 183 class CGdiDisplayDriver : public CGdiDeviceDriver { |
184 public: | 184 public: |
185 CGdiDisplayDriver(HDC hDC); | 185 CGdiDisplayDriver(HDC hDC); |
186 | 186 |
187 protected: | 187 protected: |
188 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 188 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
189 int left, | 189 int left, |
190 int top, | 190 int top, |
191 void* pIccTransform = NULL, | 191 void* pIccTransform = nullptr, |
192 FX_BOOL bDEdge = FALSE) override; | 192 FX_BOOL bDEdge = FALSE) override; |
193 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 193 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
194 uint32_t color, | 194 uint32_t color, |
195 const FX_RECT* pSrcRect, | 195 const FX_RECT* pSrcRect, |
196 int left, | 196 int left, |
197 int top, | 197 int top, |
198 int blend_type, | 198 int blend_type, |
199 int alpha_flag, | 199 int alpha_flag, |
200 void* pIccTransform) override; | 200 void* pIccTransform) override; |
201 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 201 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
(...skipping 20 matching lines...) Expand all Loading... |
222 } | 222 } |
223 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, | 223 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, |
224 uint32_t color, | 224 uint32_t color, |
225 int dest_left, | 225 int dest_left, |
226 int dest_top, | 226 int dest_top, |
227 int dest_width, | 227 int dest_width, |
228 int dest_height, | 228 int dest_height, |
229 const FX_RECT* pClipRect, | 229 const FX_RECT* pClipRect, |
230 int render_flags, | 230 int render_flags, |
231 int alpha_flag = 0, | 231 int alpha_flag = 0, |
232 void* pIccTransform = NULL, | 232 void* pIccTransform = nullptr, |
233 int blend_type = FXDIB_BLEND_NORMAL); | 233 int blend_type = FXDIB_BLEND_NORMAL); |
234 }; | 234 }; |
235 | 235 |
236 class CGdiPrinterDriver : public CGdiDeviceDriver { | 236 class CGdiPrinterDriver : public CGdiDeviceDriver { |
237 public: | 237 public: |
238 explicit CGdiPrinterDriver(HDC hDC); | 238 explicit CGdiPrinterDriver(HDC hDC); |
239 ~CGdiPrinterDriver() override; | 239 ~CGdiPrinterDriver() override; |
240 | 240 |
241 protected: | 241 protected: |
242 int GetDeviceCaps(int caps_id) override; | 242 int GetDeviceCaps(int caps_id) override; |
(...skipping 24 matching lines...) Expand all Loading... |
267 void*& handle, | 267 void*& handle, |
268 int alpha_flag, | 268 int alpha_flag, |
269 void* pIccTransform, | 269 void* pIccTransform, |
270 int blend_type) override; | 270 int blend_type) override; |
271 | 271 |
272 const int m_HorzSize; | 272 const int m_HorzSize; |
273 const int m_VertSize; | 273 const int m_VertSize; |
274 }; | 274 }; |
275 | 275 |
276 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ | 276 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |
OLD | NEW |