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_INCLUDE_FXGE_FX_GE_H_ | 7 #ifndef CORE_INCLUDE_FXGE_FX_GE_H_ |
8 #define CORE_INCLUDE_FXGE_FX_GE_H_ | 8 #define CORE_INCLUDE_FXGE_FX_GE_H_ |
9 | 9 |
10 #include "fx_dib.h" | 10 #include "fx_dib.h" |
11 #include "fx_font.h" | 11 #include "fx_font.h" |
12 | 12 |
13 class CFX_ClipRgn; | |
14 class CFX_PathData; | |
15 class CFX_GraphStateData; | |
16 class CFX_Font; | 13 class CFX_Font; |
17 class CFX_FontMgr; | 14 class CFX_FontMgr; |
18 class CFX_FontCache; | 15 class CFX_FontCache; |
19 class CFX_FaceCache; | 16 class CFX_FaceCache; |
20 class CFX_RenderDevice; | |
21 class IFX_RenderDeviceDriver; | 17 class IFX_RenderDeviceDriver; |
22 class CCodec_ModuleMgr; | 18 class CCodec_ModuleMgr; |
23 class IFXG_PaintModuleMgr; | |
24 | 19 |
25 class CFX_GEModule { | 20 class CFX_GEModule { |
26 public: | 21 public: |
27 static void Create(const char** pUserFontPaths); | 22 static void Create(const char** pUserFontPaths); |
28 | 23 |
29 static void Use(CFX_GEModule* pMgr); | 24 static void Use(CFX_GEModule* pMgr); |
30 | 25 |
31 static CFX_GEModule* Get(); | 26 static CFX_GEModule* Get(); |
32 | 27 |
33 static void Destroy(); | 28 static void Destroy(); |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 IFX_RenderDeviceDriver* m_pDeviceDriver; | 423 IFX_RenderDeviceDriver* m_pDeviceDriver; |
429 | 424 |
430 private: | 425 private: |
431 void InitDeviceInfo(); | 426 void InitDeviceInfo(); |
432 | 427 |
433 void UpdateClipBox(); | 428 void UpdateClipBox(); |
434 }; | 429 }; |
435 class CFX_FxgeDevice : public CFX_RenderDevice { | 430 class CFX_FxgeDevice : public CFX_RenderDevice { |
436 public: | 431 public: |
437 CFX_FxgeDevice(); | 432 CFX_FxgeDevice(); |
438 | 433 ~CFX_FxgeDevice() override; |
439 ~CFX_FxgeDevice(); | |
440 | 434 |
441 FX_BOOL Attach(CFX_DIBitmap* pBitmap, | 435 FX_BOOL Attach(CFX_DIBitmap* pBitmap, |
442 int dither_bits = 0, | 436 int dither_bits = 0, |
443 FX_BOOL bRgbByteOrder = FALSE, | 437 FX_BOOL bRgbByteOrder = FALSE, |
444 CFX_DIBitmap* pOriDevice = NULL, | 438 CFX_DIBitmap* pOriDevice = NULL, |
445 FX_BOOL bGroupKnockout = FALSE); | 439 FX_BOOL bGroupKnockout = FALSE); |
446 | 440 |
447 FX_BOOL Create(int width, | 441 FX_BOOL Create(int width, |
448 int height, | 442 int height, |
449 FXDIB_Format format, | 443 FXDIB_Format format, |
450 int dither_bits = 0, | 444 int dither_bits = 0, |
451 CFX_DIBitmap* pOriDevice = NULL); | 445 CFX_DIBitmap* pOriDevice = NULL); |
452 | 446 |
453 protected: | 447 protected: |
454 FX_BOOL m_bOwnedBitmap; | 448 FX_BOOL m_bOwnedBitmap; |
455 }; | 449 }; |
456 class CFX_SkiaDevice : public CFX_RenderDevice { | 450 class CFX_SkiaDevice : public CFX_RenderDevice { |
457 public: | 451 public: |
458 CFX_SkiaDevice(); | 452 CFX_SkiaDevice(); |
459 | 453 ~CFX_SkiaDevice() override; |
460 ~CFX_SkiaDevice(); | |
461 | 454 |
462 FX_BOOL Attach(CFX_DIBitmap* pBitmap, | 455 FX_BOOL Attach(CFX_DIBitmap* pBitmap, |
463 int dither_bits = 0, | 456 int dither_bits = 0, |
464 FX_BOOL bRgbByteOrder = FALSE, | 457 FX_BOOL bRgbByteOrder = FALSE, |
465 CFX_DIBitmap* pOriDevice = NULL, | 458 CFX_DIBitmap* pOriDevice = NULL, |
466 FX_BOOL bGroupKnockout = FALSE); | 459 FX_BOOL bGroupKnockout = FALSE); |
467 | 460 |
468 FX_BOOL Create(int width, | 461 FX_BOOL Create(int width, |
469 int height, | 462 int height, |
470 FXDIB_Format format, | 463 FXDIB_Format format, |
471 int dither_bits = 0, | 464 int dither_bits = 0, |
472 CFX_DIBitmap* pOriDevice = NULL); | 465 CFX_DIBitmap* pOriDevice = NULL); |
473 | 466 |
474 protected: | 467 protected: |
475 FX_BOOL m_bOwnedBitmap; | 468 FX_BOOL m_bOwnedBitmap; |
476 }; | 469 }; |
| 470 |
477 class IFX_RenderDeviceDriver { | 471 class IFX_RenderDeviceDriver { |
478 public: | 472 public: |
479 static IFX_RenderDeviceDriver* CreateFxgeDriver( | 473 static IFX_RenderDeviceDriver* CreateFxgeDriver( |
480 CFX_DIBitmap* pBitmap, | 474 CFX_DIBitmap* pBitmap, |
481 FX_BOOL bRgbByteOrder = FALSE, | 475 FX_BOOL bRgbByteOrder = FALSE, |
482 CFX_DIBitmap* pOriDevice = NULL, | 476 CFX_DIBitmap* pOriDevice = NULL, |
483 FX_BOOL bGroupKnockout = FALSE); | 477 FX_BOOL bGroupKnockout = FALSE); |
484 | 478 |
485 virtual ~IFX_RenderDeviceDriver() {} | 479 virtual ~IFX_RenderDeviceDriver() {} |
486 virtual void Begin() {} | 480 virtual void Begin() {} |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 void* pIccTransform = NULL) { | 600 void* pIccTransform = NULL) { |
607 return FALSE; | 601 return FALSE; |
608 } | 602 } |
609 | 603 |
610 virtual void* GetPlatformSurface() { return NULL; } | 604 virtual void* GetPlatformSurface() { return NULL; } |
611 | 605 |
612 virtual int GetDriverType() { return 0; } | 606 virtual int GetDriverType() { return 0; } |
613 | 607 |
614 virtual void ClearDriver() {} | 608 virtual void ClearDriver() {} |
615 }; | 609 }; |
| 610 |
616 class IFX_PSOutput { | 611 class IFX_PSOutput { |
617 public: | 612 public: |
618 virtual void Release() = 0; | 613 virtual void Release() = 0; |
619 virtual void OutputPS(const FX_CHAR* string, int len) = 0; | 614 virtual void OutputPS(const FX_CHAR* string, int len) = 0; |
620 | 615 |
621 protected: | 616 protected: |
622 ~IFX_PSOutput() {} | 617 virtual ~IFX_PSOutput() {} |
623 }; | 618 }; |
| 619 |
624 class CPSFont; | 620 class CPSFont; |
625 class CFX_PSRenderer { | 621 class CFX_PSRenderer { |
626 public: | 622 public: |
627 CFX_PSRenderer(); | 623 CFX_PSRenderer(); |
628 | 624 |
629 ~CFX_PSRenderer(); | 625 ~CFX_PSRenderer(); |
630 | 626 |
631 void Init(IFX_PSOutput* pOutput, | 627 void Init(IFX_PSOutput* pOutput, |
632 int ps_level, | 628 int ps_level, |
633 int width, | 629 int width, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, | 721 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, |
726 CFX_Font* pFont, | 722 CFX_Font* pFont, |
727 const FXTEXT_CHARPOS& charpos, | 723 const FXTEXT_CHARPOS& charpos, |
728 int& ps_fontnum, | 724 int& ps_fontnum, |
729 int& ps_glyphindex); | 725 int& ps_glyphindex); |
730 | 726 |
731 void WritePSBinary(const uint8_t* data, int len); | 727 void WritePSBinary(const uint8_t* data, int len); |
732 }; | 728 }; |
733 | 729 |
734 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 730 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
OLD | NEW |