summaryrefslogtreecommitdiff
path: root/core/fxge/win32/win32_int.h
diff options
context:
space:
mode:
authorrbpotter <rbpotter@chromium.org>2017-07-11 10:04:29 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-07-11 17:22:12 +0000
commite8468c43cb3b14f4440456d19cb047150509949d (patch)
treec11fc22bfe770abf5321fceb32644dca5c34faa1 /core/fxge/win32/win32_int.h
parent00c3cfdbae074a379cab4edad0e4fa75d6127797 (diff)
downloadpdfium-e8468c43cb3b14f4440456d19cb047150509949d.tar.xz
Add Windows generic / text only printer driver support.
BUG=chromium:734850 Change-Id: Icc0947e2e99e77a36d8963fcf0b6d3deea161d3e Reviewed-on: https://pdfium-review.googlesource.com/7194 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/win32/win32_int.h')
-rw-r--r--core/fxge/win32/win32_int.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index d92d3b333c..c51bae7f67 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -333,4 +333,66 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
CFX_PSRenderer m_PSRenderer;
};
+class CTextOnlyPrinterDriver : public IFX_RenderDeviceDriver {
+ public:
+ explicit CTextOnlyPrinterDriver(HDC hDC);
+ ~CTextOnlyPrinterDriver() override;
+
+ protected:
+ // IFX_RenderDeviceDriver
+ int GetDeviceCaps(int caps_id) const 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_RetainPtr<CFX_DIBSource>& pBitmap,
+ uint32_t color,
+ const FX_RECT* pSrcRect,
+ int left,
+ int top,
+ int blend_type) override;
+ bool StretchDIBits(const CFX_RetainPtr<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_RetainPtr<CFX_DIBSource>& pBitmap,
+ int bitmap_alpha,
+ uint32_t color,
+ const CFX_Matrix* pMatrix,
+ uint32_t render_flags,
+ std::unique_ptr<CFX_ImageRenderer>* handle,
+ int blend_type) override;
+ bool DrawDeviceText(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ const CFX_Matrix* pObject2Device,
+ float font_size,
+ uint32_t color) override;
+
+ HDC m_hDC;
+ int m_Width;
+ int m_Height;
+ int m_nBitsPerPixel;
+ int m_HorzSize;
+ int m_VertSize;
+ float m_OriginY;
+ bool m_SetOrigin;
+};
#endif // CORE_FXGE_WIN32_WIN32_INT_H_