diff options
author | rbpotter <rbpotter@chromium.org> | 2017-01-06 08:10:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-06 08:10:19 -0800 |
commit | 8d94b6687f27e1238f352939434704f75b330c1d (patch) | |
tree | eec42ae295885acce22ed547359ead388ba17737 /core/fxge/win32/win32_int.h | |
parent | 469f6da247ffe77d0ae6089e5d93db0b0c0bb37e (diff) | |
download | pdfium-8d94b6687f27e1238f352939434704f75b330c1d.tar.xz |
Revert postscript code removal.
Revert CL http://crrev.com/2608663003 in preparation for adding
postscript generation to Pdfium.
Note postscript generation code will not be called until additional
patches land. These patches will also include modifications needed to
make this code functional (currently missing a few compression functions).
BUG=
Review-Url: https://codereview.chromium.org/2615703002
Diffstat (limited to 'core/fxge/win32/win32_int.h')
-rw-r--r-- | core/fxge/win32/win32_int.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index ae090b72d3..974a1200e6 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -9,8 +9,12 @@ #include <windows.h> +#include <memory> + #include "core/fxge/cfx_pathdata.h" #include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/win32/cfx_psrenderer.h" +#include "core/fxge/win32/cpsoutput.h" #include "core/fxge/win32/dwrite_int.h" struct FXTEXT_CHARPOS; @@ -260,4 +264,71 @@ class CGdiPrinterDriver : public CGdiDeviceDriver { const int m_VertSize; }; +class CPSPrinterDriver : public IFX_RenderDeviceDriver { + public: + CPSPrinterDriver(HDC hDC, int ps_level, bool bCmykOutput); + ~CPSPrinterDriver() override; + + protected: + // IFX_RenderDeviceDriver + int GetDeviceCaps(int caps_id) const override; + bool StartRendering() override; + void EndRendering() override; + void SaveState() override; + void RestoreState(bool bKeepSaved) override; + bool SetClip_PathFill(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + int fill_mode) override; + bool SetClip_PathStroke(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + const CFX_GraphStateData* pGraphState) override; + 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 blend_type) override; + bool GetClipBox(FX_RECT* pRect) override; + bool SetDIBits(const CFX_DIBSource* pBitmap, + uint32_t color, + const FX_RECT* pSrcRect, + int left, + int top, + int blend_type) override; + bool StretchDIBits(const CFX_DIBSource* pBitmap, + uint32_t color, + int dest_left, + int dest_top, + int dest_width, + int dest_height, + const FX_RECT* pClipRect, + uint32_t flags, + int blend_type) override; + bool StartDIBits(const CFX_DIBSource* pBitmap, + int bitmap_alpha, + uint32_t color, + const CFX_Matrix* pMatrix, + uint32_t render_flags, + void*& handle, + int blend_type) override; + bool DrawDeviceText(int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + const CFX_Matrix* pObject2Device, + FX_FLOAT font_size, + uint32_t color) override; + void* GetPlatformSurface() const override; + + HDC m_hDC; + bool m_bCmykOutput; + int m_Width; + int m_Height; + int m_nBitsPerPixel; + int m_HorzSize; + int m_VertSize; + std::unique_ptr<CPSOutput> m_pPSOutput; + CFX_PSRenderer m_PSRenderer; +}; + #endif // CORE_FXGE_WIN32_WIN32_INT_H_ |