Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
ctext_only_printer_driver.h
Go to the documentation of this file.
1// Copyright 2020 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CORE_FXGE_WIN32_CTEXT_ONLY_PRINTER_DRIVER_H_
6#define CORE_FXGE_WIN32_CTEXT_ONLY_PRINTER_DRIVER_H_
7
8#include <stdint.h>
9#include <windows.h>
10
11#include <memory>
12
13#include "core/fxge/cfx_windowsrenderdevice.h"
14
15class CTextOnlyPrinterDriver final : public RenderDeviceDriverIface {
16 public:
17 explicit CTextOnlyPrinterDriver(HDC hDC);
19
20 private:
21 // RenderDeviceDriverIface:
22 DeviceType GetDeviceType() const override;
23 int GetDeviceCaps(int caps_id) const override;
24 void SaveState() override;
25 void RestoreState(bool bKeepSaved) override;
26 bool SetClip_PathFill(const CFX_Path& path,
27 const CFX_Matrix* pObject2Device,
28 const CFX_FillRenderOptions& fill_options) override;
29 bool SetClip_PathStroke(const CFX_Path& path,
30 const CFX_Matrix* pObject2Device,
31 const CFX_GraphStateData* pGraphState) override;
32 bool DrawPath(const CFX_Path& path,
33 const CFX_Matrix* pObject2Device,
34 const CFX_GraphStateData* pGraphState,
35 uint32_t fill_color,
36 uint32_t stroke_color,
37 const CFX_FillRenderOptions& fill_options) override;
38 FX_RECT GetClipBox() const override;
39 bool SetDIBits(RetainPtr<const CFX_DIBBase> bitmap,
40 uint32_t color,
41 const FX_RECT& src_rect,
42 int left,
43 int top,
44 BlendMode blend_type) override;
45 bool StretchDIBits(RetainPtr<const CFX_DIBBase> bitmap,
46 uint32_t color,
47 int dest_left,
48 int dest_top,
49 int dest_width,
50 int dest_height,
51 const FX_RECT* pClipRect,
52 const FXDIB_ResampleOptions& options,
53 BlendMode blend_type) override;
55 float alpha,
56 uint32_t color,
57 const CFX_Matrix& matrix,
58 const FXDIB_ResampleOptions& options,
59 BlendMode blend_type) override;
60 bool DrawDeviceText(pdfium::span<const TextCharPos> pCharPos,
61 CFX_Font* pFont,
62 const CFX_Matrix& mtObject2Device,
63 float font_size,
64 uint32_t color,
65 const CFX_TextRenderOptions& options) override;
66 bool MultiplyAlpha(float alpha) override;
67 bool MultiplyAlphaMask(RetainPtr<const CFX_DIBitmap> mask) override;
68
69 HDC m_hDC;
70 const int m_Width;
71 const int m_Height;
72 int m_nBitsPerPixel;
73 const int m_HorzSize;
74 const int m_VertSize;
75 float m_OriginY;
76 bool m_SetOrigin;
77};
78
79#endif // CORE_FXGE_WIN32_CTEXT_ONLY_PRINTER_DRIVER_H_
WindowsPrintMode g_pdfium_print_mode
CFX_WindowsRenderDevice(HDC hDC, CFX_PSFontTracker *ps_font_tracker, const EncoderIface *encoder_iface)
~CFX_WindowsRenderDevice() override
bool GDI_SetDIBits(RetainPtr< const CFX_DIBBase > source, const FX_RECT &src_rect, int left, int top)
void SetBaseClip(const FX_RECT &rect) override
const DeviceType m_DeviceType
bool SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) override
void DrawLine(float x1, float y1, float x2, float y2)
bool FillRect(const FX_RECT &rect, uint32_t fill_color) override
~CGdiDeviceDriver() override
bool SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
bool GDI_StretchDIBits(RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height, const FXDIB_ResampleOptions &options)
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options) override
int GetDeviceCaps(int caps_id) const override
FX_RECT GetClipBox() const override
bool MultiplyAlpha(float alpha) override
CGdiDeviceDriver(HDC hDC, DeviceType device_type)
void RestoreState(bool bKeepSaved) override
DeviceType GetDeviceType() const override
bool MultiplyAlphaMask(RetainPtr< const CFX_DIBitmap > mask) override
std::optional< FX_RECT > m_BaseClipBox
void SaveState() override
bool GDI_StretchBitMask(RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height, uint32_t bitmap_color)
bool DrawCosmeticLine(const CFX_PointF &ptMoveTo, const CFX_PointF &ptLineTo, uint32_t color) override
~CGdiDisplayDriver() override
bool GetDIBits(RetainPtr< CFX_DIBitmap > bitmap, int left, int top) const override
StartResult StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
int GetDeviceCaps(int caps_id) const override
bool SetDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const FX_RECT &src_rect, int left, int top, BlendMode blend_type) override
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT *pClipRect, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT *pClipRect, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
bool SetDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const FX_RECT &src_rect, int left, int top, BlendMode blend_type) override
~CGdiPrinterDriver() override
int GetDeviceCaps(int caps_id) const override
StartResult StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
bool DrawDeviceText(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color, const CFX_TextRenderOptions &options) override
bool SetClip_PathFill(const CFX_Path &paath, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT *pClipRect, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
CPSPrinterDriver(HDC hDC, WindowsPrintMode mode, CFX_PSFontTracker *ps_font_tracker, const EncoderIface *encoder_iface)
~CPSPrinterDriver() override
int GetDeviceCaps(int caps_id) const override
bool DrawDeviceText(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color, const CFX_TextRenderOptions &options) override
bool MultiplyAlpha(float alpha) override
void SaveState() override
bool SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) override
bool MultiplyAlphaMask(RetainPtr< const CFX_DIBitmap > mask) override
bool SetDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const FX_RECT &src_rect, int left, int top, BlendMode blend_type) override
StartResult StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
DeviceType GetDeviceType() const override
void RestoreState(bool bKeepSaved) override
FX_RECT GetClipBox() const override
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options) override
DeviceType GetDeviceType() const override
~CTextOnlyPrinterDriver() override
bool SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
bool DrawDeviceText(pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color, const CFX_TextRenderOptions &options) override
void RestoreState(bool bKeepSaved) override
bool MultiplyAlpha(float alpha) override
bool SetClip_PathStroke(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) override
StartResult StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
int GetDeviceCaps(int caps_id) const override
bool StretchDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT *pClipRect, const FXDIB_ResampleOptions &options, BlendMode blend_type) override
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options) override
FX_RECT GetClipBox() const override
bool MultiplyAlphaMask(RetainPtr< const CFX_DIBitmap > mask) override
bool SetDIBits(RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const FX_RECT &src_rect, int left, int top, BlendMode blend_type) override
CFX_PTemplate< float > CFX_PointF
BlendMode
Definition fx_dib.h:119