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
cgdi_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// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FXGE_WIN32_CGDI_PRINTER_DRIVER_H_
8#define CORE_FXGE_WIN32_CGDI_PRINTER_DRIVER_H_
9
10#include <windows.h>
11
12#include <memory>
13
14#include "core/fxge/win32/cgdi_device_driver.h"
15
16class CGdiPrinterDriver final : public CGdiDeviceDriver {
17 public:
18 explicit CGdiPrinterDriver(HDC hDC);
19 ~CGdiPrinterDriver() override;
20
21 private:
22 // CGdiPrinterDriver:
23 int GetDeviceCaps(int caps_id) const override;
24 bool SetDIBits(const RetainPtr<const CFX_DIBBase>& pBitmap,
25 uint32_t color,
26 const FX_RECT& src_rect,
27 int left,
28 int top,
29 BlendMode blend_type) override;
30 bool StretchDIBits(RetainPtr<const CFX_DIBBase> bitmap,
31 uint32_t color,
32 int dest_left,
33 int dest_top,
34 int dest_width,
35 int dest_height,
36 const FX_RECT* pClipRect,
37 const FXDIB_ResampleOptions& options,
38 BlendMode blend_type) override;
39 bool StartDIBits(RetainPtr<const CFX_DIBBase> bitmap,
40 float alpha,
41 uint32_t color,
42 const CFX_Matrix& matrix,
43 const FXDIB_ResampleOptions& options,
44 std::unique_ptr<CFX_ImageRenderer>* handle,
45 BlendMode blend_type) override;
46 bool DrawDeviceText(pdfium::span<const TextCharPos> pCharPos,
47 CFX_Font* pFont,
48 const CFX_Matrix& mtObject2Device,
49 float font_size,
50 uint32_t color,
51 const CFX_TextRenderOptions& options) override;
52
53 const int m_HorzSize;
54 const int m_VertSize;
55};
56
57#endif // CORE_FXGE_WIN32_CGDI_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 MultiplyAlphaMask(const RetainPtr< const CFX_DIBBase > &mask) override
void SetBaseClip(const FX_RECT &rect) override
absl::optional< FX_RECT > m_BaseClipBox
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)
~CGdiDeviceDriver() override
bool SetClip_PathFill(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) 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, BlendMode blend_type) override
bool GDI_SetDIBits(const RetainPtr< const CFX_DIBBase > &source, const FX_RECT &src_rect, int left, int top)
bool GetClipBox(FX_RECT *pRect) 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 DrawCosmeticLine(const CFX_PointF &ptMoveTo, const CFX_PointF &ptLineTo, uint32_t color, BlendMode blend_type) override
int GetDeviceCaps(int caps_id) const override
bool MultiplyAlpha(float alpha) override
CGdiDeviceDriver(HDC hDC, DeviceType device_type)
void RestoreState(bool bKeepSaved) override
DeviceType GetDeviceType() const override
void SaveState() override
bool FillRectWithBlend(const FX_RECT &rect, uint32_t fill_color, BlendMode blend_type) 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)
~CGdiDisplayDriver() override
int GetDeviceCaps(int caps_id) const override
bool SetDIBits(const RetainPtr< const CFX_DIBBase > &pBitmap, 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 GetDIBits(const RetainPtr< CFX_DIBitmap > &pBitmap, int left, int top) override
bool StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, std::unique_ptr< CFX_ImageRenderer > *handle, 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(const RetainPtr< const CFX_DIBBase > &pBitmap, 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
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 StartDIBits(RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, std::unique_ptr< CFX_ImageRenderer > *handle, BlendMode blend_type) override
BlendMode
Definition fx_dib.h:49