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
CGdiDeviceDriver Class Reference

#include <cgdi_device_driver.h>

Inheritance diagram for CGdiDeviceDriver:
Collaboration diagram for CGdiDeviceDriver:

Protected Member Functions

 CGdiDeviceDriver (HDC hDC, DeviceType device_type)
 ~CGdiDeviceDriver () override
DeviceType GetDeviceType () const override
int GetDeviceCaps (int caps_id) const override
void SaveState () override
void RestoreState (bool bKeepSaved) override
void SetBaseClip (const FX_RECT &rect) override
bool SetClip_PathFill (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options) override
bool SetClip_PathStroke (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState) 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
bool FillRect (const FX_RECT &rect, uint32_t fill_color) override
bool DrawCosmeticLine (const CFX_PointF &ptMoveTo, const CFX_PointF &ptLineTo, uint32_t color) override
FX_RECT GetClipBox () const override
bool MultiplyAlpha (float alpha) override
bool MultiplyAlphaMask (RetainPtr< const CFX_DIBitmap > mask) override
void DrawLine (float x1, float y1, float x2, float y2)
bool GDI_SetDIBits (RetainPtr< const CFX_DIBBase > source, const FX_RECT &src_rect, int left, int top)
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 GDI_StretchBitMask (RetainPtr< const CFX_DIBBase > source, int dest_left, int dest_top, int dest_width, int dest_height, uint32_t bitmap_color)

Protected Attributes

const HDC m_hDC
bool m_bMetafileDCType
int m_Width
int m_Height
int m_nBitsPerPixel
const DeviceType m_DeviceType
int m_RenderCaps
std::optional< FX_RECTm_BaseClipBox

Additional Inherited Members

Public Types inherited from RenderDeviceDriverIface
enum class  Result { kFailure , kSuccess }
Public Member Functions inherited from RenderDeviceDriverIface
virtual ~RenderDeviceDriverIface ()
virtual bool GetDIBits (RetainPtr< CFX_DIBitmap > bitmap, int left, int top) const
virtual RetainPtr< const CFX_DIBitmapGetBackDrop () const
virtual bool SetDIBits (RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const FX_RECT &src_rect, int dest_left, int dest_top, BlendMode blend_type)=0
virtual 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)=0
virtual StartResult StartDIBits (RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_type)=0
virtual bool ContinueDIBits (CFX_AggImageRenderer *handle, PauseIndicatorIface *pPause)
virtual bool DrawDeviceText (pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color, const CFX_TextRenderOptions &options)
virtual int GetDriverType () const

Detailed Description

Definition at line 19 of file cgdi_device_driver.h.

Constructor & Destructor Documentation

◆ CGdiDeviceDriver()

CGdiDeviceDriver::CGdiDeviceDriver ( HDC hDC,
DeviceType device_type )
protected

Definition at line 349 of file cgdi_device_driver.cpp.

References CGdiDeviceDriver(), kDisplay, m_DeviceType, m_Height, m_nBitsPerPixel, m_RenderCaps, and m_Width.

Referenced by CGdiDeviceDriver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CGdiDeviceDriver()

CGdiDeviceDriver::~CGdiDeviceDriver ( )
overrideprotecteddefault

Member Function Documentation

◆ DrawCosmeticLine()

bool CGdiDeviceDriver::DrawCosmeticLine ( const CFX_PointF & ptMoveTo,
const CFX_PointF & ptLineTo,
uint32_t color )
overrideprotectedvirtual

Reimplemented from RenderDeviceDriverIface.

Definition at line 761 of file cgdi_device_driver.cpp.

Referenced by DrawPath().

Here is the caller graph for this function:

◆ DrawLine()

void CGdiDeviceDriver::DrawLine ( float x1,
float y1,
float x2,
float y2 )
protected

Definition at line 574 of file cgdi_device_driver.cpp.

References m_bMetafileDCType, m_Height, and m_Width.

Referenced by DrawPath().

Here is the caller graph for this function:

◆ DrawPath()

bool CGdiDeviceDriver::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 )
overrideprotectedvirtual

◆ FillRect()

bool CGdiDeviceDriver::FillRect ( const FX_RECT & rect,
uint32_t fill_color )
overrideprotectedvirtual

Reimplemented from RenderDeviceDriverIface.

Definition at line 705 of file cgdi_device_driver.cpp.

◆ GDI_SetDIBits()

bool CGdiDeviceDriver::GDI_SetDIBits ( RetainPtr< const CFX_DIBBase > source,
const FX_RECT & src_rect,
int left,
int top )
protected

Definition at line 407 of file cgdi_device_driver.cpp.

References FX_RECT::FX_RECT(), FX_RECT::Height(), and FX_RECT::Width().

Referenced by CGdiDisplayDriver::SetDIBits(), and CGdiPrinterDriver::SetDIBits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GDI_StretchBitMask()

bool CGdiDeviceDriver::GDI_StretchBitMask ( RetainPtr< const CFX_DIBBase > source,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
uint32_t bitmap_color )
protected

Definition at line 490 of file cgdi_device_driver.cpp.

References m_nBitsPerPixel.

Referenced by CGdiPrinterDriver::StretchDIBits().

Here is the caller graph for this function:

◆ GDI_StretchDIBits()

bool CGdiDeviceDriver::GDI_StretchDIBits ( RetainPtr< const CFX_DIBBase > source,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
const FXDIB_ResampleOptions & options )
protected

Definition at line 448 of file cgdi_device_driver.cpp.

References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), and FXDIB_ResampleOptions::bInterpolateBilinear.

Referenced by CGdiDisplayDriver::StretchDIBits(), and CGdiPrinterDriver::StretchDIBits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetClipBox()

FX_RECT CGdiDeviceDriver::GetClipBox ( ) const
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 554 of file cgdi_device_driver.cpp.

References FX_RECT::FX_RECT(), m_Height, and m_Width.

Here is the call graph for this function:

◆ GetDeviceCaps()

int CGdiDeviceDriver::GetDeviceCaps ( int caps_id) const
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Reimplemented in CGdiDisplayDriver, and CGdiPrinterDriver.

Definition at line 382 of file cgdi_device_driver.cpp.

References m_Height, m_nBitsPerPixel, m_RenderCaps, and m_Width.

Referenced by CGdiDisplayDriver::GetDeviceCaps(), and CGdiPrinterDriver::GetDeviceCaps().

Here is the caller graph for this function:

◆ GetDeviceType()

DeviceType CGdiDeviceDriver::GetDeviceType ( ) const
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 378 of file cgdi_device_driver.cpp.

References m_DeviceType.

◆ MultiplyAlpha()

bool CGdiDeviceDriver::MultiplyAlpha ( float alpha)
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 562 of file cgdi_device_driver.cpp.

◆ MultiplyAlphaMask()

bool CGdiDeviceDriver::MultiplyAlphaMask ( RetainPtr< const CFX_DIBitmap > mask)
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 568 of file cgdi_device_driver.cpp.

◆ RestoreState()

void CGdiDeviceDriver::RestoreState ( bool bKeepSaved)
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 401 of file cgdi_device_driver.cpp.

◆ SaveState()

void CGdiDeviceDriver::SaveState ( )
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 397 of file cgdi_device_driver.cpp.

◆ SetBaseClip()

void CGdiDeviceDriver::SetBaseClip ( const FX_RECT & rect)
overrideprotectedvirtual

Reimplemented from RenderDeviceDriverIface.

Definition at line 722 of file cgdi_device_driver.cpp.

◆ SetClip_PathFill()

bool CGdiDeviceDriver::SetClip_PathFill ( const CFX_Path & path,
const CFX_Matrix * pObject2Device,
const CFX_FillRenderOptions & fill_options )
overrideprotectedvirtual

Implements RenderDeviceDriverIface.

Definition at line 726 of file cgdi_device_driver.cpp.

◆ SetClip_PathStroke()

bool CGdiDeviceDriver::SetClip_PathStroke ( const CFX_Path & path,
const CFX_Matrix * pObject2Device,
const CFX_GraphStateData * pGraphState )
overrideprotectedvirtual

Reimplemented from RenderDeviceDriverIface.

Definition at line 746 of file cgdi_device_driver.cpp.

Member Data Documentation

◆ m_BaseClipBox

std::optional<FX_RECT> CGdiDeviceDriver::m_BaseClipBox
protected

Definition at line 76 of file cgdi_device_driver.h.

◆ m_bMetafileDCType

bool CGdiDeviceDriver::m_bMetafileDCType
protected

Definition at line 70 of file cgdi_device_driver.h.

Referenced by DrawLine().

◆ m_DeviceType

const DeviceType CGdiDeviceDriver::m_DeviceType
protected

Definition at line 74 of file cgdi_device_driver.h.

Referenced by CGdiDeviceDriver(), and GetDeviceType().

◆ m_hDC

const HDC CGdiDeviceDriver::m_hDC
protected

Definition at line 69 of file cgdi_device_driver.h.

◆ m_Height

int CGdiDeviceDriver::m_Height
protected

Definition at line 72 of file cgdi_device_driver.h.

Referenced by CGdiDeviceDriver(), DrawLine(), GetClipBox(), and GetDeviceCaps().

◆ m_nBitsPerPixel

int CGdiDeviceDriver::m_nBitsPerPixel
protected

Definition at line 73 of file cgdi_device_driver.h.

Referenced by CGdiDeviceDriver(), GDI_StretchBitMask(), and GetDeviceCaps().

◆ m_RenderCaps

int CGdiDeviceDriver::m_RenderCaps
protected

◆ m_Width

int CGdiDeviceDriver::m_Width
protected

Definition at line 71 of file cgdi_device_driver.h.

Referenced by CGdiDeviceDriver(), DrawLine(), GetClipBox(), and GetDeviceCaps().


The documentation for this class was generated from the following files: