diff options
Diffstat (limited to 'core/fxge/include')
-rw-r--r-- | core/fxge/include/fx_ge.h | 96 | ||||
-rw-r--r-- | core/fxge/include/fx_ge_win32.h | 17 |
2 files changed, 6 insertions, 107 deletions
diff --git a/core/fxge/include/fx_ge.h b/core/fxge/include/fx_ge.h index 8111e46d13..1cbbc2cc97 100644 --- a/core/fxge/include/fx_ge.h +++ b/core/fxge/include/fx_ge.h @@ -433,8 +433,6 @@ class IFX_RenderDeviceDriver { virtual CFX_Matrix GetCTM() const { return CFX_Matrix(); } - virtual FX_BOOL IsPSPrintDriver() { return FALSE; } - virtual FX_BOOL StartRendering() { return TRUE; } virtual void EndRendering() {} @@ -563,98 +561,4 @@ class IFX_RenderDeviceDriver { } }; -class IFX_PSOutput { - public: - virtual void Release() = 0; - virtual void OutputPS(const FX_CHAR* str, int len) = 0; - - protected: - virtual ~IFX_PSOutput() {} -}; - -class CFX_PSRenderer { - public: - CFX_PSRenderer(); - ~CFX_PSRenderer(); - - void Init(IFX_PSOutput* pOutput, - int ps_level, - int width, - int height, - FX_BOOL bCmykOutput); - FX_BOOL StartRendering(); - void EndRendering(); - void SaveState(); - void RestoreState(bool bKeepSaved); - void SetClip_PathFill(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - int fill_mode); - void SetClip_PathStroke(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - const CFX_GraphStateData* pGraphState); - FX_RECT GetClipBox() { return m_ClipBox; } - FX_BOOL DrawPath(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - const CFX_GraphStateData* pGraphState, - uint32_t fill_color, - uint32_t stroke_color, - int fill_mode, - int alpha_flag = 0, - void* pIccTransform = NULL); - FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, - uint32_t color, - int dest_left, - int dest_top, - int alpha_flag = 0, - void* pIccTransform = NULL); - FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, - uint32_t color, - int dest_left, - int dest_top, - int dest_width, - int dest_height, - uint32_t flags, - int alpha_flag = 0, - void* pIccTransform = NULL); - FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap, - uint32_t color, - const CFX_Matrix* pMatrix, - uint32_t flags, - int alpha_flag = 0, - void* pIccTransform = NULL); - FX_BOOL DrawText(int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - CFX_FontCache* pCache, - const CFX_Matrix* pObject2Device, - FX_FLOAT font_size, - uint32_t color, - int alpha_flag = 0, - void* pIccTransform = NULL); - - private: - void OutputPath(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device); - void SetGraphState(const CFX_GraphStateData* pGraphState); - void SetColor(uint32_t color, int alpha_flag, void* pIccTransform); - void FindPSFontGlyph(CFX_FaceCache* pFaceCache, - CFX_Font* pFont, - const FXTEXT_CHARPOS& charpos, - int& ps_fontnum, - int& ps_glyphindex); - void WritePSBinary(const uint8_t* data, int len); - - IFX_PSOutput* m_pOutput; - int m_PSLevel; - CFX_GraphStateData m_CurGraphState; - FX_BOOL m_bGraphStateSet; - FX_BOOL m_bCmykOutput; - FX_BOOL m_bColorSet; - uint32_t m_LastColor; - FX_RECT m_ClipBox; - CFX_ArrayTemplate<CPSFont*> m_PSFontList; - CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; - FX_BOOL m_bInited; -}; - #endif // CORE_FXGE_INCLUDE_FX_GE_H_ diff --git a/core/fxge/include/fx_ge_win32.h b/core/fxge/include/fx_ge_win32.h index b4337c117c..a6d8fbb378 100644 --- a/core/fxge/include/fx_ge_win32.h +++ b/core/fxge/include/fx_ge_win32.h @@ -22,6 +22,7 @@ typedef struct WINDIB_Open_Args_ { const FX_WCHAR* path_name; } WINDIB_Open_Args_; + class CFX_WindowsDIB : public CFX_DIBitmap { public: static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap); @@ -62,26 +63,20 @@ class CFX_WindowsDIB : public CFX_DIBitmap { HBITMAP m_hOldBitmap; }; + class CFX_WindowsDevice : public CFX_RenderDevice { public: - static IFX_RenderDeviceDriver* CreateDriver(HDC hDC, - FX_BOOL bCmykOutput = FALSE); + static IFX_RenderDeviceDriver* CreateDriver(HDC hDC); - CFX_WindowsDevice(HDC hDC, - FX_BOOL bCmykOutput = FALSE, - FX_BOOL bForcePSOutput = FALSE, - int psLevel = 2); + explicit CFX_WindowsDevice(HDC hDC); + ~CFX_WindowsDevice(); HDC GetDC() const; - - FX_BOOL m_bForcePSOutput; - - static int m_psLevel; }; + class CFX_WinBitmapDevice : public CFX_RenderDevice { public: CFX_WinBitmapDevice(int width, int height, FXDIB_Format format); - ~CFX_WinBitmapDevice(); HDC GetDC() { return m_hDC; } |