| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 uint32_t render_flags, | 266 uint32_t render_flags, |
| 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 class CPSOutput : public IFX_PSOutput { | |
| 277 public: | |
| 278 explicit CPSOutput(HDC hDC); | |
| 279 ~CPSOutput() override; | |
| 280 | |
| 281 // IFX_PSOutput | |
| 282 void Release() override { delete this; } | |
| 283 void OutputPS(const FX_CHAR* str, int len) override; | |
| 284 | |
| 285 void Init(); | |
| 286 | |
| 287 HDC m_hDC; | |
| 288 FX_CHAR* m_pBuf; | |
| 289 }; | |
| 290 | |
| 291 class CPSPrinterDriver : public IFX_RenderDeviceDriver { | |
| 292 public: | |
| 293 CPSPrinterDriver(); | |
| 294 FX_BOOL Init(HDC hDC, int ps_level, FX_BOOL bCmykOutput); | |
| 295 ~CPSPrinterDriver() override; | |
| 296 | |
| 297 protected: | |
| 298 // IFX_RenderDeviceDriver | |
| 299 int GetDeviceCaps(int caps_id) override; | |
| 300 FX_BOOL IsPSPrintDriver() override { return TRUE; } | |
| 301 FX_BOOL StartRendering() override; | |
| 302 void EndRendering() override; | |
| 303 void SaveState() override; | |
| 304 void RestoreState(bool bKeepSaved) override; | |
| 305 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | |
| 306 const CFX_Matrix* pObject2Device, | |
| 307 int fill_mode) override; | |
| 308 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | |
| 309 const CFX_Matrix* pObject2Device, | |
| 310 const CFX_GraphStateData* pGraphState) override; | |
| 311 FX_BOOL DrawPath(const CFX_PathData* pPathData, | |
| 312 const CFX_Matrix* pObject2Device, | |
| 313 const CFX_GraphStateData* pGraphState, | |
| 314 uint32_t fill_color, | |
| 315 uint32_t stroke_color, | |
| 316 int fill_mode, | |
| 317 int alpha_flag, | |
| 318 void* pIccTransform, | |
| 319 int blend_type) override; | |
| 320 FX_BOOL GetClipBox(FX_RECT* pRect) override; | |
| 321 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | |
| 322 uint32_t color, | |
| 323 const FX_RECT* pSrcRect, | |
| 324 int left, | |
| 325 int top, | |
| 326 int blend_type, | |
| 327 int alpha_flag, | |
| 328 void* pIccTransform) override; | |
| 329 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | |
| 330 uint32_t color, | |
| 331 int dest_left, | |
| 332 int dest_top, | |
| 333 int dest_width, | |
| 334 int dest_height, | |
| 335 const FX_RECT* pClipRect, | |
| 336 uint32_t flags, | |
| 337 int alpha_flag, | |
| 338 void* pIccTransform, | |
| 339 int blend_type) override; | |
| 340 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | |
| 341 int bitmap_alpha, | |
| 342 uint32_t color, | |
| 343 const CFX_Matrix* pMatrix, | |
| 344 uint32_t render_flags, | |
| 345 void*& handle, | |
| 346 int alpha_flag, | |
| 347 void* pIccTransform, | |
| 348 int blend_type) override; | |
| 349 FX_BOOL DrawDeviceText(int nChars, | |
| 350 const FXTEXT_CHARPOS* pCharPos, | |
| 351 CFX_Font* pFont, | |
| 352 CFX_FontCache* pCache, | |
| 353 const CFX_Matrix* pObject2Device, | |
| 354 FX_FLOAT font_size, | |
| 355 uint32_t color, | |
| 356 int alpha_flag, | |
| 357 void* pIccTransform) override; | |
| 358 void* GetPlatformSurface() const override { return (void*)m_hDC; } | |
| 359 | |
| 360 HDC m_hDC; | |
| 361 FX_BOOL m_bCmykOutput; | |
| 362 int m_Width, m_Height, m_nBitsPerPixel; | |
| 363 int m_HorzSize, m_VertSize; | |
| 364 CPSOutput* m_pPSOutput; | |
| 365 CFX_PSRenderer m_PSRenderer; | |
| 366 }; | |
| 367 | |
| 368 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ | 276 #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |
| OLD | NEW |