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

#include <cfx_renderdevice.h>

Inheritance diagram for CFX_RenderDevice:
Collaboration diagram for CFX_RenderDevice:

Classes

class  StateRestorer

Public Member Functions

virtual ~CFX_RenderDevice ()
void SaveState ()
void RestoreState (bool bKeepSaved)
int GetWidth () const
int GetHeight () const
DeviceType GetDeviceType () const
int GetRenderCaps () const
int GetDeviceCaps (int id) const
RetainPtr< CFX_DIBitmapGetBitmap ()
RetainPtr< const CFX_DIBitmapGetBitmap () const
bool CreateCompatibleBitmap (const RetainPtr< CFX_DIBitmap > &pDIB, int width, int height) const
const FX_RECTGetClipBox () const
void SetBaseClip (const FX_RECT &rect)
bool SetClip_PathFill (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options)
bool SetClip_PathStroke (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState)
bool SetClip_Rect (const FX_RECT &pRect)
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)
bool FillRect (const FX_RECT &rect, uint32_t color)
RetainPtr< const CFX_DIBitmapGetBackDrop () const
bool GetDIBits (RetainPtr< CFX_DIBitmap > bitmap, int left, int top) const
bool SetDIBits (RetainPtr< const CFX_DIBBase > bitmap, int left, int top)
bool SetDIBitsWithBlend (RetainPtr< const CFX_DIBBase > bitmap, int left, int top, BlendMode blend_mode)
bool StretchDIBits (RetainPtr< const CFX_DIBBase > bitmap, int left, int top, int dest_width, int dest_height)
bool StretchDIBitsWithFlagsAndBlend (RetainPtr< const CFX_DIBBase > bitmap, int left, int top, int dest_width, int dest_height, const FXDIB_ResampleOptions &options, BlendMode blend_mode)
bool SetBitMask (RetainPtr< const CFX_DIBBase > bitmap, int left, int top, uint32_t argb)
bool StretchBitMask (RetainPtr< CFX_DIBBase > bitmap, int left, int top, int dest_width, int dest_height, uint32_t color)
bool StretchBitMaskWithFlags (RetainPtr< CFX_DIBBase > bitmap, int left, int top, int dest_width, int dest_height, uint32_t argb, const FXDIB_ResampleOptions &options)
RenderDeviceDriverIface::StartResult StartDIBits (RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t argb, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options)
RenderDeviceDriverIface::StartResult StartDIBitsWithBlend (RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t argb, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, BlendMode blend_mode)
bool ContinueDIBits (CFX_AggImageRenderer *handle, PauseIndicatorIface *pPause)
bool DrawNormalText (pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, float font_size, const CFX_Matrix &mtText2Device, uint32_t fill_color, const CFX_TextRenderOptions &options)
bool DrawTextPath (pdfium::span< const TextCharPos > pCharPos, CFX_Font *pFont, float font_size, const CFX_Matrix &mtText2User, const CFX_Matrix *pUser2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, CFX_Path *pClippingPath, const CFX_FillRenderOptions &fill_options)
void DrawFillRect (const CFX_Matrix *pUser2Device, const CFX_FloatRect &rect, const CFX_Color &color, int32_t nTransparency)
void DrawFillRect (const CFX_Matrix *pUser2Device, const CFX_FloatRect &rect, const FX_COLORREF &color)
void DrawStrokeRect (const CFX_Matrix &mtUser2Device, const CFX_FloatRect &rect, const FX_COLORREF &color, float fWidth)
void DrawStrokeLine (const CFX_Matrix *pUser2Device, const CFX_PointF &ptMoveTo, const CFX_PointF &ptLineTo, const FX_COLORREF &color, float fWidth)
void DrawBorder (const CFX_Matrix *pUser2Device, const CFX_FloatRect &rect, float fWidth, const CFX_Color &color, const CFX_Color &crLeftTop, const CFX_Color &crRightBottom, BorderStyle nStyle, int32_t nTransparency)
void DrawFillArea (const CFX_Matrix &mtUser2Device, const std::vector< CFX_PointF > &points, const FX_COLORREF &color)
void DrawShadow (const CFX_Matrix &mtUser2Device, const CFX_FloatRect &rect, int32_t nTransparency, int32_t nStartGray, int32_t nEndGray)
bool MultiplyAlpha (float alpha)
bool MultiplyAlphaMask (RetainPtr< const CFX_DIBitmap > mask)

Static Public Member Functions

static CFX_Matrix GetFlipMatrix (float width, float height, float left, float top)

Protected Member Functions

 CFX_RenderDevice ()
void SetBitmap (RetainPtr< CFX_DIBitmap > bitmap)
void SetDeviceDriver (std::unique_ptr< RenderDeviceDriverIface > pDriver)
RenderDeviceDriverIfaceGetDeviceDriver () const

Detailed Description

Definition at line 39 of file cfx_renderdevice.h.

Constructor & Destructor Documentation

◆ ~CFX_RenderDevice()

CFX_RenderDevice::~CFX_RenderDevice ( )
virtual

Definition at line 493 of file cfx_renderdevice.cpp.

References RestoreState().

Here is the call graph for this function:

◆ CFX_RenderDevice()

CFX_RenderDevice::CFX_RenderDevice ( )
protecteddefault

Member Function Documentation

◆ ContinueDIBits()

bool CFX_RenderDevice::ContinueDIBits ( CFX_AggImageRenderer * handle,
PauseIndicatorIface * pPause )

Definition at line 1021 of file cfx_renderdevice.cpp.

◆ CreateCompatibleBitmap()

bool CFX_RenderDevice::CreateCompatibleBitmap ( const RetainPtr< CFX_DIBitmap > & pDIB,
int width,
int height ) const
nodiscard

Definition at line 549 of file cfx_renderdevice.cpp.

Referenced by FillRect().

Here is the caller graph for this function:

◆ DrawBorder()

void CFX_RenderDevice::DrawBorder ( const CFX_Matrix * pUser2Device,
const CFX_FloatRect & rect,
float fWidth,
const CFX_Color & color,
const CFX_Color & crLeftTop,
const CFX_Color & crRightBottom,
BorderStyle nStyle,
int32_t nTransparency )

Definition at line 1378 of file cfx_renderdevice.cpp.

References CFX_Path::AppendPoint(), CFX_Path::AppendRect(), CFX_FloatRect::bottom, DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), kBeveled, kDash, kInset, CFX_Path::Point::kLine, CFX_Path::Point::kMove, kSolid, kUnderline, CFX_FloatRect::left, CFX_GraphStateData::m_DashPhase, CFX_GraphStateData::m_LineWidth, CFX_FloatRect::right, CFX_Color::ToFXColor(), CFX_FloatRect::top, and CFX_FillRenderOptions::WindingOptions().

Referenced by CPWL_Wnd::DrawThisAppearance().

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

◆ DrawFillArea()

void CFX_RenderDevice::DrawFillArea ( const CFX_Matrix & mtUser2Device,
const std::vector< CFX_PointF > & points,
const FX_COLORREF & color )

Definition at line 1306 of file cfx_renderdevice.cpp.

References CFX_Path::AppendPoint(), DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), CFX_Path::Point::kLine, and CFX_Path::Point::kMove.

Here is the call graph for this function:

◆ DrawFillRect() [1/2]

void CFX_RenderDevice::DrawFillRect ( const CFX_Matrix * pUser2Device,
const CFX_FloatRect & rect,
const CFX_Color & color,
int32_t nTransparency )

Definition at line 1348 of file cfx_renderdevice.cpp.

References DrawFillRect(), and CFX_Color::ToFXColor().

Referenced by CPWL_Wnd::DrawThisAppearance().

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

◆ DrawFillRect() [2/2]

void CFX_RenderDevice::DrawFillRect ( const CFX_Matrix * pUser2Device,
const CFX_FloatRect & rect,
const FX_COLORREF & color )

Definition at line 1297 of file cfx_renderdevice.cpp.

References CFX_Path::AppendFloatRect(), DrawPath(), and CFX_FillRenderOptions::WindingOptions().

Referenced by DrawFillRect(), and CPWL_ListBox::DrawThisAppearance().

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

◆ DrawNormalText()

◆ DrawPath()

◆ DrawShadow()

void CFX_RenderDevice::DrawShadow ( const CFX_Matrix & mtUser2Device,
const CFX_FloatRect & rect,
int32_t nTransparency,
int32_t nStartGray,
int32_t nEndGray )

Definition at line 1355 of file cfx_renderdevice.cpp.

References ArgbEncode(), CFX_FloatRect::bottom, DrawStrokeLine(), CFX_FloatRect::Height(), and CFX_FloatRect::top.

Referenced by CPWL_SBButton::DrawThisAppearance().

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

◆ DrawStrokeLine()

void CFX_RenderDevice::DrawStrokeLine ( const CFX_Matrix * pUser2Device,
const CFX_PointF & ptMoveTo,
const CFX_PointF & ptLineTo,
const FX_COLORREF & color,
float fWidth )

Definition at line 1332 of file cfx_renderdevice.cpp.

References CFX_Path::AppendPoint(), DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), CFX_Path::Point::kLine, CFX_Path::Point::kMove, and CFX_GraphStateData::m_LineWidth.

Referenced by DrawShadow(), CPWL_SBButton::DrawThisAppearance(), and CPWL_ScrollBar::DrawThisAppearance().

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

◆ DrawStrokeRect()

void CFX_RenderDevice::DrawStrokeRect ( const CFX_Matrix & mtUser2Device,
const CFX_FloatRect & rect,
const FX_COLORREF & color,
float fWidth )

Definition at line 1319 of file cfx_renderdevice.cpp.

References CFX_Path::AppendFloatRect(), DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), and CFX_GraphStateData::m_LineWidth.

Referenced by CPWL_SBButton::DrawThisAppearance().

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

◆ DrawTextPath()

bool CFX_RenderDevice::DrawTextPath ( pdfium::span< const TextCharPos > pCharPos,
CFX_Font * pFont,
float font_size,
const CFX_Matrix & mtText2User,
const CFX_Matrix * pUser2Device,
const CFX_GraphStateData * pGraphState,
uint32_t fill_color,
uint32_t stroke_color,
CFX_Path * pClippingPath,
const CFX_FillRenderOptions & fill_options )

Definition at line 1256 of file cfx_renderdevice.cpp.

◆ FillRect()

bool CFX_RenderDevice::FillRect ( const FX_RECT & rect,
uint32_t color )

Definition at line 797 of file cfx_renderdevice.cpp.

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

Referenced by DrawPath(), FPDFBitmap_FillRect(), CPDF_RenderContext::GetBackgroundToDevice(), CBC_OnedEAN13Writer::ShowChars(), CBC_OnedEAN8Writer::ShowChars(), CBC_OnedUPCAWriter::ShowChars(), and CBC_OneDimWriter::ShowDeviceChars().

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

◆ GetBackDrop()

RetainPtr< const CFX_DIBitmap > CFX_RenderDevice::GetBackDrop ( ) const

Definition at line 891 of file cfx_renderdevice.cpp.

◆ GetBitmap() [1/2]

RetainPtr< CFX_DIBitmap > CFX_RenderDevice::GetBitmap ( )

Definition at line 537 of file cfx_renderdevice.cpp.

◆ GetBitmap() [2/2]

RetainPtr< const CFX_DIBitmap > CFX_RenderDevice::GetBitmap ( ) const

Definition at line 541 of file cfx_renderdevice.cpp.

◆ GetClipBox()

const FX_RECT & CFX_RenderDevice::GetClipBox ( ) const
inline

Definition at line 70 of file cfx_renderdevice.h.

Referenced by TEST(), TEST(), TEST(), TEST(), and TEST().

Here is the caller graph for this function:

◆ GetDeviceCaps()

int CFX_RenderDevice::GetDeviceCaps ( int id) const

Definition at line 533 of file cfx_renderdevice.cpp.

Referenced by CPDF_DeviceBuffer::CalculateMatrix().

Here is the caller graph for this function:

◆ GetDeviceDriver()

RenderDeviceDriverIface * CFX_RenderDevice::GetDeviceDriver ( ) const
inlineprotected

Definition at line 213 of file cfx_renderdevice.h.

Referenced by CFX_DefaultRenderDevice::Clear().

Here is the caller graph for this function:

◆ GetDeviceType()

DeviceType CFX_RenderDevice::GetDeviceType ( ) const
inline

Definition at line 62 of file cfx_renderdevice.h.

Referenced by DrawNormalText().

Here is the caller graph for this function:

◆ GetDIBits()

bool CFX_RenderDevice::GetDIBits ( RetainPtr< CFX_DIBitmap > bitmap,
int left,
int top ) const

Definition at line 878 of file cfx_renderdevice.cpp.

Referenced by DrawNormalText().

Here is the caller graph for this function:

◆ GetFlipMatrix()

CFX_Matrix CFX_RenderDevice::GetFlipMatrix ( float width,
float height,
float left,
float top )
static

Definition at line 498 of file cfx_renderdevice.cpp.

References CFX_Matrix::CFX_Matrix().

Referenced by CPDF_RenderStatus::CompositeDIBitmap(), CFX_SkiaDeviceDriver::SetBitsWithMask(), CFX_PSRenderer::SetDIBits(), CFX_SkiaDeviceDriver::SetDIBits(), CFX_PSRenderer::StretchDIBits(), and CFX_SkiaDeviceDriver::StretchDIBits().

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

◆ GetHeight()

int CFX_RenderDevice::GetHeight ( ) const
inline

Definition at line 61 of file cfx_renderdevice.h.

Referenced by CPDF_RenderContext::GetBackgroundToDevice().

Here is the caller graph for this function:

◆ GetRenderCaps()

int CFX_RenderDevice::GetRenderCaps ( ) const
inline

Definition at line 63 of file cfx_renderdevice.h.

◆ GetWidth()

int CFX_RenderDevice::GetWidth ( ) const
inline

Definition at line 60 of file cfx_renderdevice.h.

Referenced by CPDF_RenderContext::GetBackgroundToDevice().

Here is the caller graph for this function:

◆ MultiplyAlpha()

bool CFX_RenderDevice::MultiplyAlpha ( float alpha)

Definition at line 1503 of file cfx_renderdevice.cpp.

◆ MultiplyAlphaMask()

bool CFX_RenderDevice::MultiplyAlphaMask ( RetainPtr< const CFX_DIBitmap > mask)

Definition at line 1507 of file cfx_renderdevice.cpp.

◆ RestoreState()

void CFX_RenderDevice::RestoreState ( bool bKeepSaved)

Definition at line 526 of file cfx_renderdevice.cpp.

Referenced by ~CFX_RenderDevice(), pdfium::CFDE_TextOut::DrawLogicText(), and CXFA_TextLayout::DrawString().

Here is the caller graph for this function:

◆ SaveState()

void CFX_RenderDevice::SaveState ( )

Definition at line 522 of file cfx_renderdevice.cpp.

Referenced by pdfium::CFDE_TextOut::DrawLogicText(), and CXFA_TextLayout::DrawString().

Here is the caller graph for this function:

◆ SetBaseClip()

void CFX_RenderDevice::SetBaseClip ( const FX_RECT & rect)

Definition at line 558 of file cfx_renderdevice.cpp.

◆ SetBitmap()

void CFX_RenderDevice::SetBitmap ( RetainPtr< CFX_DIBitmap > bitmap)
protected

Definition at line 545 of file cfx_renderdevice.cpp.

◆ SetBitMask()

bool CFX_RenderDevice::SetBitMask ( RetainPtr< const CFX_DIBBase > bitmap,
int left,
int top,
uint32_t argb )

Definition at line 965 of file cfx_renderdevice.cpp.

Referenced by DrawNormalText().

Here is the caller graph for this function:

◆ SetClip_PathFill()

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

Definition at line 562 of file cfx_renderdevice.cpp.

Referenced by SetClip_Rect(), TEST(), and XFA_DrawImage().

Here is the caller graph for this function:

◆ SetClip_PathStroke()

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

Definition at line 573 of file cfx_renderdevice.cpp.

Referenced by TEST().

Here is the caller graph for this function:

◆ SetClip_Rect()

bool CFX_RenderDevice::SetClip_Rect ( const FX_RECT & pRect)

Definition at line 584 of file cfx_renderdevice.cpp.

References CFX_Path::AppendRect(), FX_RECT::bottom, FX_RECT::left, FX_RECT::right, SetClip_PathFill(), FX_RECT::top, and CFX_FillRenderOptions::WindingOptions().

Referenced by CPWL_EditImpl::DrawEdit(), pdfium::CFDE_TextOut::DrawLogicText(), CXFA_TextLayout::DrawString(), TEST(), and TEST().

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

◆ SetDeviceDriver()

void CFX_RenderDevice::SetDeviceDriver ( std::unique_ptr< RenderDeviceDriverIface > pDriver)
protected

Definition at line 505 of file cfx_renderdevice.cpp.

◆ SetDIBits()

bool CFX_RenderDevice::SetDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
int left,
int top )

Definition at line 885 of file cfx_renderdevice.cpp.

References kNormal, and SetDIBitsWithBlend().

Referenced by DrawNormalText().

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

◆ SetDIBitsWithBlend()

bool CFX_RenderDevice::SetDIBitsWithBlend ( RetainPtr< const CFX_DIBBase > bitmap,
int left,
int top,
BlendMode blend_mode )

Definition at line 895 of file cfx_renderdevice.cpp.

References FX_RECT::FX_RECT(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), kBgrx, kNormal, FX_RECT::left, FX_RECT::top, and FX_RECT::Width().

Referenced by SetDIBits().

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

◆ StartDIBits()

RenderDeviceDriverIface::StartResult CFX_RenderDevice::StartDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
float alpha,
uint32_t argb,
const CFX_Matrix & matrix,
const FXDIB_ResampleOptions & options )

Definition at line 1000 of file cfx_renderdevice.cpp.

References kNormal, and StartDIBitsWithBlend().

Here is the call graph for this function:

◆ StartDIBitsWithBlend()

RenderDeviceDriverIface::StartResult CFX_RenderDevice::StartDIBitsWithBlend ( RetainPtr< const CFX_DIBBase > bitmap,
float alpha,
uint32_t argb,
const CFX_Matrix & matrix,
const FXDIB_ResampleOptions & options,
BlendMode blend_mode )

Definition at line 1010 of file cfx_renderdevice.cpp.

Referenced by StartDIBits().

Here is the caller graph for this function:

◆ StretchBitMask()

bool CFX_RenderDevice::StretchBitMask ( RetainPtr< CFX_DIBBase > bitmap,
int left,
int top,
int dest_width,
int dest_height,
uint32_t color )

Definition at line 974 of file cfx_renderdevice.cpp.

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

Here is the call graph for this function:

◆ StretchBitMaskWithFlags()

bool CFX_RenderDevice::StretchBitMaskWithFlags ( RetainPtr< CFX_DIBBase > bitmap,
int left,
int top,
int dest_width,
int dest_height,
uint32_t argb,
const FXDIB_ResampleOptions & options )

Definition at line 984 of file cfx_renderdevice.cpp.

References FX_RECT::FX_RECT(), and FX_RECT::Intersect().

Referenced by StretchBitMask().

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

◆ StretchDIBits()

bool CFX_RenderDevice::StretchDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
int left,
int top,
int dest_width,
int dest_height )

Definition at line 939 of file cfx_renderdevice.cpp.

References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), kNormal, and StretchDIBitsWithFlagsAndBlend().

Here is the call graph for this function:

◆ StretchDIBitsWithFlagsAndBlend()

bool CFX_RenderDevice::StretchDIBitsWithFlagsAndBlend ( RetainPtr< const CFX_DIBBase > bitmap,
int left,
int top,
int dest_width,
int dest_height,
const FXDIB_ResampleOptions & options,
BlendMode blend_mode )

Definition at line 949 of file cfx_renderdevice.cpp.

References FX_RECT::FX_RECT(), and FX_RECT::Intersect().

Referenced by StretchDIBits().

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

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