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 <windows.h> | 10 #include <windows.h> |
11 | 11 |
| 12 #include <memory> |
| 13 |
12 #include "core/fxge/cfx_pathdata.h" | 14 #include "core/fxge/cfx_pathdata.h" |
13 #include "core/fxge/ifx_renderdevicedriver.h" | 15 #include "core/fxge/ifx_renderdevicedriver.h" |
| 16 #include "core/fxge/win32/cfx_psrenderer.h" |
| 17 #include "core/fxge/win32/cpsoutput.h" |
14 #include "core/fxge/win32/dwrite_int.h" | 18 #include "core/fxge/win32/dwrite_int.h" |
15 | 19 |
16 struct FXTEXT_CHARPOS; | 20 struct FXTEXT_CHARPOS; |
17 struct WINDIB_Open_Args_; | 21 struct WINDIB_Open_Args_; |
18 | 22 |
19 typedef HANDLE(__stdcall* FuncType_GdiAddFontMemResourceEx)(PVOID pbFont, | 23 typedef HANDLE(__stdcall* FuncType_GdiAddFontMemResourceEx)(PVOID pbFont, |
20 DWORD cbFont, | 24 DWORD cbFont, |
21 PVOID pdv, | 25 PVOID pdv, |
22 DWORD* pcFonts); | 26 DWORD* pcFonts); |
23 typedef BOOL(__stdcall* FuncType_GdiRemoveFontMemResourceEx)(HANDLE handle); | 27 typedef BOOL(__stdcall* FuncType_GdiRemoveFontMemResourceEx)(HANDLE handle); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 const FXTEXT_CHARPOS* pCharPos, | 257 const FXTEXT_CHARPOS* pCharPos, |
254 CFX_Font* pFont, | 258 CFX_Font* pFont, |
255 const CFX_Matrix* pObject2Device, | 259 const CFX_Matrix* pObject2Device, |
256 FX_FLOAT font_size, | 260 FX_FLOAT font_size, |
257 uint32_t color) override; | 261 uint32_t color) override; |
258 | 262 |
259 const int m_HorzSize; | 263 const int m_HorzSize; |
260 const int m_VertSize; | 264 const int m_VertSize; |
261 }; | 265 }; |
262 | 266 |
| 267 class CPSPrinterDriver : public IFX_RenderDeviceDriver { |
| 268 public: |
| 269 CPSPrinterDriver(HDC hDC, int ps_level, bool bCmykOutput); |
| 270 ~CPSPrinterDriver() override; |
| 271 |
| 272 protected: |
| 273 // IFX_RenderDeviceDriver |
| 274 int GetDeviceCaps(int caps_id) const override; |
| 275 bool StartRendering() override; |
| 276 void EndRendering() override; |
| 277 void SaveState() override; |
| 278 void RestoreState(bool bKeepSaved) override; |
| 279 bool SetClip_PathFill(const CFX_PathData* pPathData, |
| 280 const CFX_Matrix* pObject2Device, |
| 281 int fill_mode) override; |
| 282 bool SetClip_PathStroke(const CFX_PathData* pPathData, |
| 283 const CFX_Matrix* pObject2Device, |
| 284 const CFX_GraphStateData* pGraphState) override; |
| 285 bool DrawPath(const CFX_PathData* pPathData, |
| 286 const CFX_Matrix* pObject2Device, |
| 287 const CFX_GraphStateData* pGraphState, |
| 288 uint32_t fill_color, |
| 289 uint32_t stroke_color, |
| 290 int fill_mode, |
| 291 int blend_type) override; |
| 292 bool GetClipBox(FX_RECT* pRect) override; |
| 293 bool SetDIBits(const CFX_DIBSource* pBitmap, |
| 294 uint32_t color, |
| 295 const FX_RECT* pSrcRect, |
| 296 int left, |
| 297 int top, |
| 298 int blend_type) override; |
| 299 bool StretchDIBits(const CFX_DIBSource* pBitmap, |
| 300 uint32_t color, |
| 301 int dest_left, |
| 302 int dest_top, |
| 303 int dest_width, |
| 304 int dest_height, |
| 305 const FX_RECT* pClipRect, |
| 306 uint32_t flags, |
| 307 int blend_type) override; |
| 308 bool StartDIBits(const CFX_DIBSource* pBitmap, |
| 309 int bitmap_alpha, |
| 310 uint32_t color, |
| 311 const CFX_Matrix* pMatrix, |
| 312 uint32_t render_flags, |
| 313 void*& handle, |
| 314 int blend_type) override; |
| 315 bool DrawDeviceText(int nChars, |
| 316 const FXTEXT_CHARPOS* pCharPos, |
| 317 CFX_Font* pFont, |
| 318 const CFX_Matrix* pObject2Device, |
| 319 FX_FLOAT font_size, |
| 320 uint32_t color) override; |
| 321 void* GetPlatformSurface() const override; |
| 322 |
| 323 HDC m_hDC; |
| 324 bool m_bCmykOutput; |
| 325 int m_Width; |
| 326 int m_Height; |
| 327 int m_nBitsPerPixel; |
| 328 int m_HorzSize; |
| 329 int m_VertSize; |
| 330 std::unique_ptr<CPSOutput> m_pPSOutput; |
| 331 CFX_PSRenderer m_PSRenderer; |
| 332 }; |
| 333 |
263 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ | 334 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |
OLD | NEW |