| 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 "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
| 11 #include "core/include/fxge/fx_font.h" | 11 #include "core/include/fxge/fx_font.h" |
| 12 | 12 |
| 13 class CFX_Font; | 13 class CFX_Font; |
| 14 class CFX_FontMgr; | 14 class CFX_FontMgr; |
| 15 class CFX_FontCache; | 15 class CFX_FontCache; |
| 16 class CFX_FaceCache; | 16 class CFX_FaceCache; |
| 17 class CPDF_ShadingPattern; |
| 17 class IFX_RenderDeviceDriver; | 18 class IFX_RenderDeviceDriver; |
| 18 class CCodec_ModuleMgr; | 19 class CCodec_ModuleMgr; |
| 19 class SkPictureRecorder; | 20 class SkPictureRecorder; |
| 20 | 21 |
| 21 class CFX_GEModule { | 22 class CFX_GEModule { |
| 22 public: | 23 public: |
| 23 static void Create(const char** pUserFontPaths); | 24 static void Create(const char** pUserFontPaths); |
| 24 | 25 |
| 25 static void Use(CFX_GEModule* pMgr); | 26 static void Use(CFX_GEModule* pMgr); |
| 26 | 27 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 #define FXRC_ALPHA_MASK 0x04 | 209 #define FXRC_ALPHA_MASK 0x04 |
| 209 #define FXRC_ALPHA_PATH 0x10 | 210 #define FXRC_ALPHA_PATH 0x10 |
| 210 #define FXRC_ALPHA_IMAGE 0x20 | 211 #define FXRC_ALPHA_IMAGE 0x20 |
| 211 #define FXRC_ALPHA_OUTPUT 0x40 | 212 #define FXRC_ALPHA_OUTPUT 0x40 |
| 212 #define FXRC_BLEND_MODE 0x80 | 213 #define FXRC_BLEND_MODE 0x80 |
| 213 #define FXRC_SOFT_CLIP 0x100 | 214 #define FXRC_SOFT_CLIP 0x100 |
| 214 #define FXRC_CMYK_OUTPUT 0x200 | 215 #define FXRC_CMYK_OUTPUT 0x200 |
| 215 #define FXRC_BITMASK_OUTPUT 0x400 | 216 #define FXRC_BITMASK_OUTPUT 0x400 |
| 216 #define FXRC_BYTEMASK_OUTPUT 0x800 | 217 #define FXRC_BYTEMASK_OUTPUT 0x800 |
| 217 #define FXRENDER_IMAGE_LOSSY 0x1000 | 218 #define FXRENDER_IMAGE_LOSSY 0x1000 |
| 219 #define FXRC_FILLSTROKE_PATH 0x2000 |
| 220 #define FXRC_SHADING 0x4000 |
| 218 #define FXFILL_ALTERNATE 1 | 221 #define FXFILL_ALTERNATE 1 |
| 219 #define FXFILL_WINDING 2 | 222 #define FXFILL_WINDING 2 |
| 220 #define FXFILL_FULLCOVER 4 | 223 #define FXFILL_FULLCOVER 4 |
| 221 #define FXFILL_RECT_AA 8 | 224 #define FXFILL_RECT_AA 8 |
| 222 #define FX_FILL_STROKE 16 | 225 #define FX_FILL_STROKE 16 |
| 223 #define FX_STROKE_ADJUST 32 | 226 #define FX_STROKE_ADJUST 32 |
| 224 #define FX_STROKE_TEXT_MODE 64 | 227 #define FX_STROKE_TEXT_MODE 64 |
| 225 #define FX_FILL_TEXT_MODE 128 | 228 #define FX_FILL_TEXT_MODE 128 |
| 226 #define FX_ZEROAREA_FILL 256 | 229 #define FX_ZEROAREA_FILL 256 |
| 227 #define FXFILL_NOPATHSMOOTH 512 | 230 #define FXFILL_NOPATHSMOOTH 512 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 int nFlag = 0, | 393 int nFlag = 0, |
| 391 int alpha_flag = 0, | 394 int alpha_flag = 0, |
| 392 void* pIccTransform = NULL, | 395 void* pIccTransform = NULL, |
| 393 int blend_type = FXDIB_BLEND_NORMAL); | 396 int blend_type = FXDIB_BLEND_NORMAL); |
| 394 virtual void Begin() {} | 397 virtual void Begin() {} |
| 395 virtual void End() {} | 398 virtual void End() {} |
| 396 | 399 |
| 397 private: | 400 private: |
| 398 void InitDeviceInfo(); | 401 void InitDeviceInfo(); |
| 399 void UpdateClipBox(); | 402 void UpdateClipBox(); |
| 403 FX_BOOL DrawFillStrokePath(const CFX_PathData* pPathData, |
| 404 const CFX_Matrix* pObject2Device, |
| 405 const CFX_GraphStateData* pGraphState, |
| 406 FX_DWORD fill_color, |
| 407 FX_DWORD stroke_color, |
| 408 int fill_mode, |
| 409 int alpha_flag, |
| 410 void* pIccTransform, |
| 411 int blend_type); |
| 400 | 412 |
| 401 CFX_DIBitmap* m_pBitmap; | 413 CFX_DIBitmap* m_pBitmap; |
| 402 int m_Width; | 414 int m_Width; |
| 403 int m_Height; | 415 int m_Height; |
| 404 int m_bpp; | 416 int m_bpp; |
| 405 int m_RenderCaps; | 417 int m_RenderCaps; |
| 406 int m_DeviceClass; | 418 int m_DeviceClass; |
| 407 FX_RECT m_ClipBox; | 419 FX_RECT m_ClipBox; |
| 408 IFX_RenderDeviceDriver* m_pDeviceDriver; | 420 IFX_RenderDeviceDriver* m_pDeviceDriver; |
| 409 }; | 421 }; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 CFX_Font* pFont, | 592 CFX_Font* pFont, |
| 581 CFX_FontCache* pCache, | 593 CFX_FontCache* pCache, |
| 582 const CFX_Matrix* pObject2Device, | 594 const CFX_Matrix* pObject2Device, |
| 583 FX_FLOAT font_size, | 595 FX_FLOAT font_size, |
| 584 FX_DWORD color, | 596 FX_DWORD color, |
| 585 int alpha_flag = 0, | 597 int alpha_flag = 0, |
| 586 void* pIccTransform = NULL) { | 598 void* pIccTransform = NULL) { |
| 587 return FALSE; | 599 return FALSE; |
| 588 } | 600 } |
| 589 | 601 |
| 590 virtual void* GetPlatformSurface() { return NULL; } | 602 virtual void* GetPlatformSurface() const { return NULL; } |
| 603 virtual int GetDriverType() const { return 0; } |
| 604 virtual void ClearDriver() {} |
| 591 | 605 |
| 592 virtual int GetDriverType() { return 0; } | 606 virtual FX_BOOL DrawShading(CPDF_ShadingPattern* pPattern, |
| 593 | 607 CFX_Matrix* pMatrix, |
| 594 virtual void ClearDriver() {} | 608 int alpha, |
| 609 FX_BOOL bAlphaMode) { |
| 610 return false; |
| 611 } |
| 595 }; | 612 }; |
| 596 | 613 |
| 597 class IFX_PSOutput { | 614 class IFX_PSOutput { |
| 598 public: | 615 public: |
| 599 virtual void Release() = 0; | 616 virtual void Release() = 0; |
| 600 virtual void OutputPS(const FX_CHAR* str, int len) = 0; | 617 virtual void OutputPS(const FX_CHAR* str, int len) = 0; |
| 601 | 618 |
| 602 protected: | 619 protected: |
| 603 virtual ~IFX_PSOutput() {} | 620 virtual ~IFX_PSOutput() {} |
| 604 }; | 621 }; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, | 724 void FindPSFontGlyph(CFX_FaceCache* pFaceCache, |
| 708 CFX_Font* pFont, | 725 CFX_Font* pFont, |
| 709 const FXTEXT_CHARPOS& charpos, | 726 const FXTEXT_CHARPOS& charpos, |
| 710 int& ps_fontnum, | 727 int& ps_fontnum, |
| 711 int& ps_glyphindex); | 728 int& ps_glyphindex); |
| 712 | 729 |
| 713 void WritePSBinary(const uint8_t* data, int len); | 730 void WritePSBinary(const uint8_t* data, int len); |
| 714 }; | 731 }; |
| 715 | 732 |
| 716 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ | 733 #endif // CORE_INCLUDE_FXGE_FX_GE_H_ |
| OLD | NEW |