diff options
author | rbpotter <rbpotter@chromium.org> | 2017-01-12 10:31:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-12 10:31:43 -0800 |
commit | db7647083d0a5cd2221b94faa15c149214d21725 (patch) | |
tree | 427c0beeb82796e8e550e672195061186d7db076 /core/fxge/win32/fx_win32_print.cpp | |
parent | e7fb8eb3e9f220a5f0c852f0238ab8d536a8bc9d (diff) | |
download | pdfium-db7647083d0a5cd2221b94faa15c149214d21725.tar.xz |
Add postscript path
This patch adds the additional functions required to make postscript
printing functional. The most significant additions are are two added
compression functions and a new API for setting the postscript level.
Not currently called from Chromium, Chromium patch to come.
BUG=
Review-Url: https://codereview.chromium.org/2612243005
Diffstat (limited to 'core/fxge/win32/fx_win32_print.cpp')
-rw-r--r-- | core/fxge/win32/fx_win32_print.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index a8cfb3d1b9..94c415b721 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -11,11 +11,11 @@ #include <vector> #include "core/fxcrt/fx_system.h" -#include "core/fxge/cfx_renderdevice.h" #include "core/fxge/cfx_windowsdevice.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/fx_freetype.h" #include "core/fxge/ge/fx_text_int.h" +#include "core/fxge/win32/cpsoutput.h" #include "core/fxge/win32/win32_int.h" #include "third_party/base/ptr_util.h" @@ -328,8 +328,8 @@ bool CGdiPrinterDriver::DrawDeviceText(int nChars, #endif } -CPSPrinterDriver::CPSPrinterDriver(HDC hDC, int pslevel, bool bCmykOutput) { - m_hDC = hDC; +CPSPrinterDriver::CPSPrinterDriver(HDC hDC, int pslevel, bool bCmykOutput) + : m_hDC(hDC), m_bCmykOutput(bCmykOutput) { m_HorzSize = ::GetDeviceCaps(m_hDC, HORZSIZE); m_VertSize = ::GetDeviceCaps(m_hDC, VERTSIZE); m_Width = ::GetDeviceCaps(m_hDC, HORZRES); @@ -337,7 +337,6 @@ CPSPrinterDriver::CPSPrinterDriver(HDC hDC, int pslevel, bool bCmykOutput) { m_nBitsPerPixel = ::GetDeviceCaps(m_hDC, BITSPIXEL); m_pPSOutput = pdfium::MakeUnique<CPSOutput>(m_hDC); m_PSRenderer.Init(m_pPSOutput.get(), pslevel, m_Width, m_Height, bCmykOutput); - m_bCmykOutput = bCmykOutput; HRGN hRgn = ::CreateRectRgn(0, 0, 1, 1); int ret = ::GetClipRgn(hDC, hRgn); if (ret == 1) { @@ -354,7 +353,7 @@ CPSPrinterDriver::CPSPrinterDriver(HDC hDC, int pslevel, bool bCmykOutput) { path.AppendRect((FX_FLOAT)pRect->left, (FX_FLOAT)pRect->bottom, (FX_FLOAT)pRect->right, (FX_FLOAT)pRect->top); } - m_PSRenderer.SetClip_PathFill(&path, NULL, FXFILL_WINDING); + m_PSRenderer.SetClip_PathFill(&path, nullptr, FXFILL_WINDING); } FX_Free(pData); } |