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_device_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_DEVICE_DRIVER_H_
8#define CORE_FXGE_WIN32_CGDI_DEVICE_DRIVER_H_
9
10#include <windows.h>
11
12#include <optional>
13
14#include "core/fxcrt/retain_ptr.h"
15#include "core/fxge/renderdevicedriver_iface.h"
16
17class CFX_DIBBase;
18
20 protected:
21 CGdiDeviceDriver(HDC hDC, DeviceType device_type);
22 ~CGdiDeviceDriver() override;
23
24 // RenderDeviceDriverIface:
25 DeviceType GetDeviceType() const override;
26 int GetDeviceCaps(int caps_id) const override;
27 void SaveState() override;
28 void RestoreState(bool bKeepSaved) override;
29 void SetBaseClip(const FX_RECT& rect) override;
30 bool SetClip_PathFill(const CFX_Path& path,
31 const CFX_Matrix* pObject2Device,
32 const CFX_FillRenderOptions& fill_options) override;
33 bool SetClip_PathStroke(const CFX_Path& path,
34 const CFX_Matrix* pObject2Device,
35 const CFX_GraphStateData* pGraphState) override;
36 bool DrawPath(const CFX_Path& path,
37 const CFX_Matrix* pObject2Device,
38 const CFX_GraphStateData* pGraphState,
39 uint32_t fill_color,
40 uint32_t stroke_color,
41 const CFX_FillRenderOptions& fill_options) override;
42 bool FillRect(const FX_RECT& rect, uint32_t fill_color) override;
43 bool DrawCosmeticLine(const CFX_PointF& ptMoveTo,
44 const CFX_PointF& ptLineTo,
45 uint32_t color) override;
46 FX_RECT GetClipBox() const override;
47 bool MultiplyAlpha(float alpha) override;
48 bool MultiplyAlphaMask(RetainPtr<const CFX_DIBitmap> mask) override;
49
50 void DrawLine(float x1, float y1, float x2, float y2);
51
52 bool GDI_SetDIBits(RetainPtr<const CFX_DIBBase> source,
53 const FX_RECT& src_rect,
54 int left,
55 int top);
56 bool GDI_StretchDIBits(RetainPtr<const CFX_DIBBase> source,
57 int dest_left,
58 int dest_top,
59 int dest_width,
60 int dest_height,
61 const FXDIB_ResampleOptions& options);
62 bool GDI_StretchBitMask(RetainPtr<const CFX_DIBBase> source,
63 int dest_left,
64 int dest_top,
65 int dest_width,
66 int dest_height,
67 uint32_t bitmap_color);
68
69 const HDC m_hDC;
77};
78
79#endif // CORE_FXGE_WIN32_CGDI_DEVICE_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
CFX_PTemplate< float > CFX_PointF
BlendMode
Definition fx_dib.h:119