| 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(); | 22 static void Create(); |
| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 IFX_RenderDeviceDriver* m_pDeviceDriver; | 422 IFX_RenderDeviceDriver* m_pDeviceDriver; |
| 428 | 423 |
| 429 private: | 424 private: |
| 430 void InitDeviceInfo(); | 425 void InitDeviceInfo(); |
| 431 | 426 |
| 432 void UpdateClipBox(); | 427 void UpdateClipBox(); |
| 433 }; | 428 }; |
| 434 class CFX_FxgeDevice : public CFX_RenderDevice { | 429 class CFX_FxgeDevice : public CFX_RenderDevice { |
| 435 public: | 430 public: |
| 436 CFX_FxgeDevice(); | 431 CFX_FxgeDevice(); |
| 437 | 432 ~CFX_FxgeDevice() override; |
| 438 ~CFX_FxgeDevice(); | |
| 439 | 433 |
| 440 FX_BOOL Attach(CFX_DIBitmap* pBitmap, | 434 FX_BOOL Attach(CFX_DIBitmap* pBitmap, |
| 441 int dither_bits = 0, | 435 int dither_bits = 0, |
| 442 FX_BOOL bRgbByteOrder = FALSE, | 436 FX_BOOL bRgbByteOrder = FALSE, |
| 443 CFX_DIBitmap* pOriDevice = NULL, | 437 CFX_DIBitmap* pOriDevice = NULL, |
| 444 FX_BOOL bGroupKnockout = FALSE); | 438 FX_BOOL bGroupKnockout = FALSE); |
| 445 | 439 |
| 446 FX_BOOL Create(int width, | 440 FX_BOOL Create(int width, |
| 447 int height, | 441 int height, |
| 448 FXDIB_Format format, | 442 FXDIB_Format format, |
| 449 int dither_bits = 0, | 443 int dither_bits = 0, |
| 450 CFX_DIBitmap* pOriDevice = NULL); | 444 CFX_DIBitmap* pOriDevice = NULL); |
| 451 | 445 |
| 452 protected: | 446 protected: |
| 453 FX_BOOL m_bOwnedBitmap; | 447 FX_BOOL m_bOwnedBitmap; |
| 454 }; | 448 }; |
| 455 class CFX_SkiaDevice : public CFX_RenderDevice { | 449 class CFX_SkiaDevice : public CFX_RenderDevice { |
| 456 public: | 450 public: |
| 457 CFX_SkiaDevice(); | 451 CFX_SkiaDevice(); |
| 458 | 452 ~CFX_SkiaDevice() override; |
| 459 ~CFX_SkiaDevice(); | |
| 460 | 453 |
| 461 FX_BOOL Attach(CFX_DIBitmap* pBitmap, | 454 FX_BOOL Attach(CFX_DIBitmap* pBitmap, |
| 462 int dither_bits = 0, | 455 int dither_bits = 0, |
| 463 FX_BOOL bRgbByteOrder = FALSE, | 456 FX_BOOL bRgbByteOrder = FALSE, |
| 464 CFX_DIBitmap* pOriDevice = NULL, | 457 CFX_DIBitmap* pOriDevice = NULL, |
| 465 FX_BOOL bGroupKnockout = FALSE); | 458 FX_BOOL bGroupKnockout = FALSE); |
| 466 | 459 |
| 467 FX_BOOL Create(int width, | 460 FX_BOOL Create(int width, |
| 468 int height, | 461 int height, |
| 469 FXDIB_Format format, | 462 FXDIB_Format format, |
| 470 int dither_bits = 0, | 463 int dither_bits = 0, |
| 471 CFX_DIBitmap* pOriDevice = NULL); | 464 CFX_DIBitmap* pOriDevice = NULL); |
| 472 | 465 |
| 473 protected: | 466 protected: |
| 474 FX_BOOL m_bOwnedBitmap; | 467 FX_BOOL m_bOwnedBitmap; |
| 475 }; | 468 }; |
| 469 |
| 476 class IFX_RenderDeviceDriver { | 470 class IFX_RenderDeviceDriver { |
| 477 public: | 471 public: |
| 478 static IFX_RenderDeviceDriver* CreateFxgeDriver( | 472 static IFX_RenderDeviceDriver* CreateFxgeDriver( |
| 479 CFX_DIBitmap* pBitmap, | 473 CFX_DIBitmap* pBitmap, |
| 480 FX_BOOL bRgbByteOrder = FALSE, | 474 FX_BOOL bRgbByteOrder = FALSE, |
| 481 CFX_DIBitmap* pOriDevice = NULL, | 475 CFX_DIBitmap* pOriDevice = NULL, |
| 482 FX_BOOL bGroupKnockout = FALSE); | 476 FX_BOOL bGroupKnockout = FALSE); |
| 483 | 477 |
| 484 virtual ~IFX_RenderDeviceDriver() {} | 478 virtual ~IFX_RenderDeviceDriver() {} |
| 485 virtual void Begin() {} | 479 virtual void Begin() {} |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 void* pIccTransform = NULL) { | 599 void* pIccTransform = NULL) { |
| 606 return FALSE; | 600 return FALSE; |
| 607 } | 601 } |
| 608 | 602 |
| 609 virtual void* GetPlatformSurface() { return NULL; } | 603 virtual void* GetPlatformSurface() { return NULL; } |
| 610 | 604 |
| 611 virtual int GetDriverType() { return 0; } | 605 virtual int GetDriverType() { return 0; } |
| 612 | 606 |
| 613 virtual void ClearDriver() {} | 607 virtual void ClearDriver() {} |
| 614 }; | 608 }; |
| 609 |
| 615 class IFX_PSOutput { | 610 class IFX_PSOutput { |
| 616 public: | 611 public: |
| 617 virtual void Release() = 0; | 612 virtual void Release() = 0; |
| 618 virtual void OutputPS(const FX_CHAR* string, int len) = 0; | 613 virtual void OutputPS(const FX_CHAR* string, int len) = 0; |
| 619 | 614 |
| 620 protected: | 615 protected: |
| 621 ~IFX_PSOutput() {} | 616 virtual ~IFX_PSOutput() {} |
| 622 }; | 617 }; |
| 618 |
| 623 class CPSFont; | 619 class CPSFont; |
| 624 class CFX_PSRenderer { | 620 class CFX_PSRenderer { |
| 625 public: | 621 public: |
| 626 CFX_PSRenderer(); | 622 CFX_PSRenderer(); |
| 627 | 623 |
| 628 ~CFX_PSRenderer(); | 624 ~CFX_PSRenderer(); |
| 629 | 625 |
| 630 void Init(IFX_PSOutput* pOutput, | 626 void Init(IFX_PSOutput* pOutput, |
| 631 int ps_level, | 627 int ps_level, |
| 632 int width, | 628 int width, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, | 720 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, |
| 725 CFX_Font* pFont, | 721 CFX_Font* pFont, |
| 726 const FXTEXT_CHARPOS& charpos, | 722 const FXTEXT_CHARPOS& charpos, |
| 727 int& ps_fontnum, | 723 int& ps_fontnum, |
| 728 int& ps_glyphindex); | 724 int& ps_glyphindex); |
| 729 | 725 |
| 730 void WritePSBinary(const uint8_t* data, int len); | 726 void WritePSBinary(const uint8_t* data, int len); |
| 731 }; | 727 }; |
| 732 | 728 |
| 733 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 729 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
| OLD | NEW |