| 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" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 class CWin32Platform { | 101 class CWin32Platform { |
| 102 public: | 102 public: |
| 103 FX_BOOL m_bHalfTone; | 103 FX_BOOL m_bHalfTone; |
| 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) 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, |
| 125 const CFX_GraphStateData* pGraphState, | 125 const CFX_GraphStateData* pGraphState, |
| 126 uint32_t fill_color, | 126 uint32_t fill_color, |
| 127 uint32_t stroke_color, | 127 uint32_t stroke_color, |
| 128 int fill_mode, | 128 int fill_mode, |
| 129 int alpha_flag, | |
| 130 void* pIccTransform, | |
| 131 int blend_type) override; | 129 int blend_type) override; |
| 132 FX_BOOL FillRect(const FX_RECT* pRect, | 130 FX_BOOL FillRectWithBlend(const FX_RECT* pRect, |
| 133 uint32_t fill_color, | 131 uint32_t fill_color, |
| 134 int alpha_flag, | 132 int blend_type) override; |
| 135 void* pIccTransform, | |
| 136 int blend_type) override; | |
| 137 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 133 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
| 138 FX_FLOAT y1, | 134 FX_FLOAT y1, |
| 139 FX_FLOAT x2, | 135 FX_FLOAT x2, |
| 140 FX_FLOAT y2, | 136 FX_FLOAT y2, |
| 141 uint32_t color, | 137 uint32_t color, |
| 142 int alpha_flag, | |
| 143 void* pIccTransform, | |
| 144 int blend_type) override; | 138 int blend_type) override; |
| 145 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 139 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
| 146 void* GetPlatformSurface() const override { return (void*)m_hDC; } | 140 void* GetPlatformSurface() const override { return (void*)m_hDC; } |
| 147 | 141 |
| 148 void DrawLine(FX_FLOAT x1, | 142 void DrawLine(FX_FLOAT x1, |
| 149 FX_FLOAT y1, | 143 FX_FLOAT y1, |
| 150 FX_FLOAT x2, | 144 FX_FLOAT x2, |
| 151 FX_FLOAT y2, | 145 FX_FLOAT y2, |
| 152 const CFX_Matrix* pMatrix); | 146 const CFX_Matrix* pMatrix); |
| 153 | 147 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 176 HDC m_hDC; | 170 HDC m_hDC; |
| 177 int m_Width; | 171 int m_Width; |
| 178 int m_Height; | 172 int m_Height; |
| 179 int m_nBitsPerPixel; | 173 int m_nBitsPerPixel; |
| 180 int m_DeviceClass; | 174 int m_DeviceClass; |
| 181 int m_RenderCaps; | 175 int m_RenderCaps; |
| 182 }; | 176 }; |
| 183 | 177 |
| 184 class CGdiDisplayDriver : public CGdiDeviceDriver { | 178 class CGdiDisplayDriver : public CGdiDeviceDriver { |
| 185 public: | 179 public: |
| 186 CGdiDisplayDriver(HDC hDC); | 180 explicit CGdiDisplayDriver(HDC hDC); |
| 181 ~CGdiDisplayDriver() override; |
| 187 | 182 |
| 188 protected: | 183 protected: |
| 189 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 184 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override; |
| 190 int left, | |
| 191 int top, | |
| 192 void* pIccTransform = nullptr, | |
| 193 FX_BOOL bDEdge = FALSE) override; | |
| 194 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 185 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 195 uint32_t color, | 186 uint32_t color, |
| 196 const FX_RECT* pSrcRect, | 187 const FX_RECT* pSrcRect, |
| 197 int left, | 188 int left, |
| 198 int top, | 189 int top, |
| 199 int blend_type, | 190 int blend_type) override; |
| 200 int alpha_flag, | |
| 201 void* pIccTransform) override; | |
| 202 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 191 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 203 uint32_t color, | 192 uint32_t color, |
| 204 int dest_left, | 193 int dest_left, |
| 205 int dest_top, | 194 int dest_top, |
| 206 int dest_width, | 195 int dest_width, |
| 207 int dest_height, | 196 int dest_height, |
| 208 const FX_RECT* pClipRect, | 197 const FX_RECT* pClipRect, |
| 209 uint32_t flags, | 198 uint32_t flags, |
| 210 int alpha_flag, | |
| 211 void* pIccTransform, | |
| 212 int blend_type) override; | 199 int blend_type) override; |
| 213 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 200 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 214 int bitmap_alpha, | 201 int bitmap_alpha, |
| 215 uint32_t color, | 202 uint32_t color, |
| 216 const CFX_Matrix* pMatrix, | 203 const CFX_Matrix* pMatrix, |
| 217 uint32_t render_flags, | 204 uint32_t render_flags, |
| 218 void*& handle, | 205 void*& handle, |
| 219 int alpha_flag, | |
| 220 void* pIccTransform, | |
| 221 int blend_type) override { | 206 int blend_type) override { |
| 222 return FALSE; | 207 return FALSE; |
| 223 } | 208 } |
| 224 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, | 209 FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, |
| 225 uint32_t color, | 210 uint32_t color, |
| 226 int dest_left, | 211 int dest_left, |
| 227 int dest_top, | 212 int dest_top, |
| 228 int dest_width, | 213 int dest_width, |
| 229 int dest_height, | 214 int dest_height, |
| 230 const FX_RECT* pClipRect, | 215 const FX_RECT* pClipRect, |
| 231 int render_flags, | 216 int render_flags); |
| 232 int alpha_flag = 0, | |
| 233 void* pIccTransform = nullptr, | |
| 234 int blend_type = FXDIB_BLEND_NORMAL); | |
| 235 }; | 217 }; |
| 236 | 218 |
| 237 class CGdiPrinterDriver : public CGdiDeviceDriver { | 219 class CGdiPrinterDriver : public CGdiDeviceDriver { |
| 238 public: | 220 public: |
| 239 explicit CGdiPrinterDriver(HDC hDC); | 221 explicit CGdiPrinterDriver(HDC hDC); |
| 240 ~CGdiPrinterDriver() override; | 222 ~CGdiPrinterDriver() override; |
| 241 | 223 |
| 242 protected: | 224 protected: |
| 243 int GetDeviceCaps(int caps_id) override; | 225 int GetDeviceCaps(int caps_id) override; |
| 244 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 226 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 245 uint32_t color, | 227 uint32_t color, |
| 246 const FX_RECT* pSrcRect, | 228 const FX_RECT* pSrcRect, |
| 247 int left, | 229 int left, |
| 248 int top, | 230 int top, |
| 249 int blend_type, | 231 int blend_type) override; |
| 250 int alpha_flag, | |
| 251 void* pIccTransform) override; | |
| 252 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 232 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 253 uint32_t color, | 233 uint32_t color, |
| 254 int dest_left, | 234 int dest_left, |
| 255 int dest_top, | 235 int dest_top, |
| 256 int dest_width, | 236 int dest_width, |
| 257 int dest_height, | 237 int dest_height, |
| 258 const FX_RECT* pClipRect, | 238 const FX_RECT* pClipRect, |
| 259 uint32_t flags, | 239 uint32_t flags, |
| 260 int alpha_flag, | |
| 261 void* pIccTransform, | |
| 262 int blend_type) override; | 240 int blend_type) override; |
| 263 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 241 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 264 int bitmap_alpha, | 242 int bitmap_alpha, |
| 265 uint32_t color, | 243 uint32_t color, |
| 266 const CFX_Matrix* pMatrix, | 244 const CFX_Matrix* pMatrix, |
| 267 uint32_t render_flags, | 245 uint32_t render_flags, |
| 268 void*& handle, | 246 void*& handle, |
| 269 int alpha_flag, | |
| 270 void* pIccTransform, | |
| 271 int blend_type) override; | 247 int blend_type) override; |
| 272 | 248 |
| 273 const int m_HorzSize; | 249 const int m_HorzSize; |
| 274 const int m_VertSize; | 250 const int m_VertSize; |
| 275 }; | 251 }; |
| 276 | 252 |
| 277 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ | 253 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |
| OLD | NEW |