| 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/ifx_renderdevicedriver.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; } | 19 FX_BOOL IsAvailable() { return !!m_hModule; } |
| 20 FX_BOOL StretchBitMask(HDC hDC, | 20 FX_BOOL StretchBitMask(HDC hDC, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 CGdiplusExt m_GdiplusExt; | 104 CGdiplusExt m_GdiplusExt; |
| 105 CDWriteExt m_DWriteExt; | 105 CDWriteExt m_DWriteExt; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 class CGdiDeviceDriver : public IFX_RenderDeviceDriver { | 108 class CGdiDeviceDriver : public IFX_RenderDeviceDriver { |
| 109 protected: | 109 protected: |
| 110 CGdiDeviceDriver(HDC hDC, int device_class); | 110 CGdiDeviceDriver(HDC hDC, int device_class); |
| 111 ~CGdiDeviceDriver() override; | 111 ~CGdiDeviceDriver() override; |
| 112 | 112 |
| 113 // IFX_RenderDeviceDriver | 113 // IFX_RenderDeviceDriver |
| 114 int GetDeviceCaps(int caps_id) override; | 114 int GetDeviceCaps(int caps_id) const override; |
| 115 void SaveState() override; | 115 void SaveState() override; |
| 116 void RestoreState(bool bKeepSaved) override; | 116 void RestoreState(bool bKeepSaved) override; |
| 117 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 117 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
| 118 const CFX_Matrix* pObject2Device, | 118 const CFX_Matrix* pObject2Device, |
| 119 int fill_mode) override; | 119 int fill_mode) override; |
| 120 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 120 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 121 const CFX_Matrix* pObject2Device, | 121 const CFX_Matrix* pObject2Device, |
| 122 const CFX_GraphStateData* pGraphState) override; | 122 const CFX_GraphStateData* pGraphState) override; |
| 123 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 123 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 124 const CFX_Matrix* pObject2Device, | 124 const CFX_Matrix* pObject2Device, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 const FX_RECT* pClipRect, | 213 const FX_RECT* pClipRect, |
| 214 int render_flags); | 214 int render_flags); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 class CGdiPrinterDriver : public CGdiDeviceDriver { | 217 class CGdiPrinterDriver : public CGdiDeviceDriver { |
| 218 public: | 218 public: |
| 219 explicit CGdiPrinterDriver(HDC hDC); | 219 explicit CGdiPrinterDriver(HDC hDC); |
| 220 ~CGdiPrinterDriver() override; | 220 ~CGdiPrinterDriver() override; |
| 221 | 221 |
| 222 protected: | 222 protected: |
| 223 int GetDeviceCaps(int caps_id) override; | 223 int GetDeviceCaps(int caps_id) const override; |
| 224 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 224 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 225 uint32_t color, | 225 uint32_t color, |
| 226 const FX_RECT* pSrcRect, | 226 const FX_RECT* pSrcRect, |
| 227 int left, | 227 int left, |
| 228 int top, | 228 int top, |
| 229 int blend_type) override; | 229 int blend_type) override; |
| 230 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 230 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 231 uint32_t color, | 231 uint32_t color, |
| 232 int dest_left, | 232 int dest_left, |
| 233 int dest_top, | 233 int dest_top, |
| 234 int dest_width, | 234 int dest_width, |
| 235 int dest_height, | 235 int dest_height, |
| 236 const FX_RECT* pClipRect, | 236 const FX_RECT* pClipRect, |
| 237 uint32_t flags, | 237 uint32_t flags, |
| 238 int blend_type) override; | 238 int blend_type) override; |
| 239 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 239 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 240 int bitmap_alpha, | 240 int bitmap_alpha, |
| 241 uint32_t color, | 241 uint32_t color, |
| 242 const CFX_Matrix* pMatrix, | 242 const CFX_Matrix* pMatrix, |
| 243 uint32_t render_flags, | 243 uint32_t render_flags, |
| 244 void*& handle, | 244 void*& handle, |
| 245 int blend_type) override; | 245 int blend_type) override; |
| 246 | 246 |
| 247 const int m_HorzSize; | 247 const int m_HorzSize; |
| 248 const int m_VertSize; | 248 const int m_VertSize; |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ | 251 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |
| OLD | NEW |