Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cfx_renderdevice.h>
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_DIBitmap > | GetBitmap () |
RetainPtr< const CFX_DIBitmap > | GetBitmap () const |
bool | CreateCompatibleBitmap (const RetainPtr< CFX_DIBitmap > &pDIB, int width, int height) const |
const FX_RECT & | GetClipBox () 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 | DrawPathWithBlend (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) |
bool | FillRect (const FX_RECT &rect, uint32_t color) |
RetainPtr< CFX_DIBitmap > | GetBackDrop () |
bool | GetDIBits (const RetainPtr< CFX_DIBitmap > &pBitmap, int left, int top) |
bool | SetDIBits (const RetainPtr< const CFX_DIBBase > &pBitmap, int left, int top) |
bool | SetDIBitsWithBlend (const RetainPtr< const CFX_DIBBase > &pBitmap, 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 (const RetainPtr< CFX_DIBBase > &pBitmap, 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) |
bool | StartDIBits (RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t argb, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, std::unique_ptr< CFX_ImageRenderer > *handle) |
bool | StartDIBitsWithBlend (RetainPtr< const CFX_DIBBase > bitmap, float alpha, uint32_t argb, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options, std::unique_ptr< CFX_ImageRenderer > *handle, BlendMode blend_mode) |
bool | ContinueDIBits (CFX_ImageRenderer *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 | DrawShading (const CPDF_ShadingPattern *pPattern, const CFX_Matrix *pMatrix, const FX_RECT &clip_rect, int alpha, bool bAlphaMode) |
bool | MultiplyAlpha (float alpha) |
bool | MultiplyAlphaMask (const RetainPtr< const CFX_DIBBase > &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) |
RenderDeviceDriverIface * | GetDeviceDriver () const |
Definition at line 39 of file cfx_renderdevice.h.
|
virtual |
Definition at line 487 of file cfx_renderdevice.cpp.
References RestoreState().
|
protecteddefault |
bool CFX_RenderDevice::ContinueDIBits | ( | CFX_ImageRenderer * | handle, |
PauseIndicatorIface * | pPause ) |
Definition at line 1018 of file cfx_renderdevice.cpp.
|
nodiscard |
Definition at line 548 of file cfx_renderdevice.cpp.
Referenced by DrawNormalText().
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 1359 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().
void CFX_RenderDevice::DrawFillArea | ( | const CFX_Matrix & | mtUser2Device, |
const std::vector< CFX_PointF > & | points, | ||
const FX_COLORREF & | color ) |
Definition at line 1278 of file cfx_renderdevice.cpp.
References CFX_Path::AppendPoint(), DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), CFX_Path::Point::kLine, and CFX_Path::Point::kMove.
void CFX_RenderDevice::DrawFillRect | ( | const CFX_Matrix * | pUser2Device, |
const CFX_FloatRect & | rect, | ||
const CFX_Color & | color, | ||
int32_t | nTransparency ) |
Definition at line 1320 of file cfx_renderdevice.cpp.
References DrawFillRect(), and CFX_Color::ToFXColor().
Referenced by CPWL_Wnd::DrawThisAppearance().
void CFX_RenderDevice::DrawFillRect | ( | const CFX_Matrix * | pUser2Device, |
const CFX_FloatRect & | rect, | ||
const FX_COLORREF & | color ) |
Definition at line 1269 of file cfx_renderdevice.cpp.
References CFX_Path::AppendFloatRect(), DrawPath(), and CFX_FillRenderOptions::WindingOptions().
Referenced by DrawFillRect(), and CPWL_ListBox::DrawThisAppearance().
bool CFX_RenderDevice::DrawNormalText | ( | pdfium::span< const TextCharPos > | pCharPos, |
CFX_Font * | pFont, | ||
float | font_size, | ||
const CFX_Matrix & | mtText2Device, | ||
uint32_t | fill_color, | ||
const CFX_TextRenderOptions & | options ) |
Definition at line 1039 of file cfx_renderdevice.cpp.
References CFX_TextRenderOptions::CFX_TextRenderOptions(), CFX_Matrix::a, CFX_FillRenderOptions::aliased_path, CFX_TextRenderOptions::aliasing_type, CFX_Matrix::b, CreateCompatibleBitmap(), DrawTextPath(), CFX_FontMgr::FTLibrarySupportsHinting(), CFX_GEModule::Get(), GetDeviceType(), GetDIBits(), TextCharPos::GetEffectiveMatrix(), CFX_Font::GetFaceRec(), CFX_GEModule::GetFontMgr(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), CFX_TextRenderOptions::IsSmooth(), k1bppMask, k8bppMask, CFX_TextRenderOptions::kAntiAliasing, kDisplay, CFX_TextRenderOptions::kLcd, kPrinter, FX_RECT::left, CFX_Font::LoadGlyphBitmap(), TextCharPos::m_bFontStyle, TextCharPos::m_FontCharWidth, TextCharPos::m_GlyphIndex, CFX_TextRenderOptions::native_text, CFX_Matrix::Scale(), SetBitMask(), SetDIBits(), FX_RECT::top, CFX_Matrix::Transform(), CFX_DefaultRenderDevice::UseSkiaRenderer(), and FX_RECT::Width().
Referenced by CPDF_TextRenderer::DrawNormalText(), and CFDE_TextOut::DrawString().
bool CFX_RenderDevice::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 ) |
Definition at line 603 of file cfx_renderdevice.cpp.
References DrawPathWithBlend(), and kNormal.
Referenced by CPDFSDK_Widget::DrawAppearance(), DrawBorder(), CPDF_Annot::DrawBorder(), CPWL_EditImpl::DrawEdit(), DrawFillArea(), DrawFillRect(), CFX_DrawUtils::DrawFocusRect(), DrawStrokeLine(), DrawStrokeRect(), CPWL_Caret::DrawThisAppearance(), CPWL_CBButton::DrawThisAppearance(), CPWL_Edit::DrawThisAppearance(), CBC_OneDimWriter::RenderDeviceResult(), and CBC_TwoDimWriter::RenderDeviceResult().
bool CFX_RenderDevice::DrawPathWithBlend | ( | 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 ) |
Definition at line 613 of file cfx_renderdevice.cpp.
References CFX_FloatRect::bottom, FX_RECT::bottom, CFX_FillRenderOptions::fill_type, CFX_FloatRect::GetOuterRect(), FX_RECT::Height(), CFX_Path::Point::kBezier, CFX_Path::Point::kLine, CFX_Path::Point::kMove, CFX_FillRenderOptions::kNoFill, CFX_FloatRect::left, FX_RECT::left, CFX_FillRenderOptions::rect_aa, CFX_FloatRect::right, FX_RECT::right, CFX_FillRenderOptions::stroke, CFX_FillRenderOptions::text_mode, CFX_FloatRect::top, FX_RECT::top, CFX_Matrix::Transform(), FX_RECT::Valid(), and FX_RECT::Width().
Referenced by DrawPath().
bool CFX_RenderDevice::DrawShading | ( | const CPDF_ShadingPattern * | pPattern, |
const CFX_Matrix * | pMatrix, | ||
const FX_RECT & | clip_rect, | ||
int | alpha, | ||
bool | bAlphaMode ) |
Definition at line 1350 of file cfx_renderdevice.cpp.
Referenced by CPDF_RenderShading::Draw().
void CFX_RenderDevice::DrawShadow | ( | const CFX_Matrix & | mtUser2Device, |
const CFX_FloatRect & | rect, | ||
int32_t | nTransparency, | ||
int32_t | nStartGray, | ||
int32_t | nEndGray ) |
Definition at line 1327 of file cfx_renderdevice.cpp.
References ArgbEncode(), CFX_FloatRect::bottom, DrawStrokeLine(), CFX_FloatRect::Height(), and CFX_FloatRect::top.
Referenced by CPWL_SBButton::DrawThisAppearance().
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 1304 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().
void CFX_RenderDevice::DrawStrokeRect | ( | const CFX_Matrix & | mtUser2Device, |
const CFX_FloatRect & | rect, | ||
const FX_COLORREF & | color, | ||
float | fWidth ) |
Definition at line 1291 of file cfx_renderdevice.cpp.
References CFX_Path::AppendFloatRect(), DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), and CFX_GraphStateData::m_LineWidth.
Referenced by CPWL_SBButton::DrawThisAppearance().
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 1228 of file cfx_renderdevice.cpp.
Referenced by DrawNormalText(), and CPDF_TextRenderer::DrawTextPath().
|
inline |
Definition at line 92 of file cfx_renderdevice.h.
References kNormal.
Referenced by FPDFBitmap_FillRect(), CPDF_RenderContext::GetBackgroundToDevice(), CBC_OnedEAN13Writer::ShowChars(), CBC_OnedEAN8Writer::ShowChars(), CBC_OnedUPCAWriter::ShowChars(), and CBC_OneDimWriter::ShowDeviceChars().
RetainPtr< CFX_DIBitmap > CFX_RenderDevice::GetBackDrop | ( | ) |
Definition at line 887 of file cfx_renderdevice.cpp.
RetainPtr< CFX_DIBitmap > CFX_RenderDevice::GetBitmap | ( | ) |
Definition at line 536 of file cfx_renderdevice.cpp.
RetainPtr< const CFX_DIBitmap > CFX_RenderDevice::GetBitmap | ( | ) | const |
Definition at line 540 of file cfx_renderdevice.cpp.
|
inline |
int CFX_RenderDevice::GetDeviceCaps | ( | int | id | ) | const |
Definition at line 532 of file cfx_renderdevice.cpp.
Referenced by CPDF_DeviceBuffer::CalculateMatrix(), and CPDF_RenderShading::Draw().
|
inlineprotected |
Definition at line 228 of file cfx_renderdevice.h.
Referenced by CFX_DefaultRenderDevice::Clear().
|
inline |
Definition at line 62 of file cfx_renderdevice.h.
Referenced by CPDF_Annot::DrawBorder(), and DrawNormalText().
bool CFX_RenderDevice::GetDIBits | ( | const RetainPtr< CFX_DIBitmap > & | pBitmap, |
int | left, | ||
int | top ) |
Definition at line 880 of file cfx_renderdevice.cpp.
Referenced by DrawNormalText().
|
static |
Definition at line 492 of file cfx_renderdevice.cpp.
References CFX_Matrix::CFX_Matrix().
Referenced by CFX_SkiaDeviceDriver::SetBitsWithMask(), CFX_PSRenderer::StretchDIBits(), and CFX_SkiaDeviceDriver::StretchDIBits().
|
inline |
Definition at line 61 of file cfx_renderdevice.h.
Referenced by CPDF_RenderContext::GetBackgroundToDevice().
|
inline |
Definition at line 63 of file cfx_renderdevice.h.
|
inline |
Definition at line 60 of file cfx_renderdevice.h.
Referenced by CPDF_RenderContext::GetBackgroundToDevice().
bool CFX_RenderDevice::MultiplyAlpha | ( | float | alpha | ) |
Definition at line 1484 of file cfx_renderdevice.cpp.
bool CFX_RenderDevice::MultiplyAlphaMask | ( | const RetainPtr< const CFX_DIBBase > & | mask | ) |
Definition at line 1488 of file cfx_renderdevice.cpp.
void CFX_RenderDevice::RestoreState | ( | bool | bKeepSaved | ) |
Definition at line 525 of file cfx_renderdevice.cpp.
Referenced by ~CFX_RenderDevice(), CFDE_TextOut::DrawLogicText(), and CXFA_TextLayout::DrawString().
void CFX_RenderDevice::SaveState | ( | ) |
Definition at line 521 of file cfx_renderdevice.cpp.
Referenced by CFDE_TextOut::DrawLogicText(), and CXFA_TextLayout::DrawString().
Definition at line 556 of file cfx_renderdevice.cpp.
|
protected |
Definition at line 544 of file cfx_renderdevice.cpp.
bool CFX_RenderDevice::SetBitMask | ( | const RetainPtr< CFX_DIBBase > & | pBitmap, |
int | left, | ||
int | top, | ||
uint32_t | argb ) |
Definition at line 961 of file cfx_renderdevice.cpp.
Referenced by DrawNormalText().
bool CFX_RenderDevice::SetClip_PathFill | ( | const CFX_Path & | path, |
const CFX_Matrix * | pObject2Device, | ||
const CFX_FillRenderOptions & | fill_options ) |
Definition at line 560 of file cfx_renderdevice.cpp.
Referenced by SetClip_Rect(), TEST(), and XFA_DrawImage().
bool CFX_RenderDevice::SetClip_PathStroke | ( | const CFX_Path & | path, |
const CFX_Matrix * | pObject2Device, | ||
const CFX_GraphStateData * | pGraphState ) |
Definition at line 571 of file cfx_renderdevice.cpp.
Referenced by TEST().
bool CFX_RenderDevice::SetClip_Rect | ( | const FX_RECT & | pRect | ) |
Definition at line 582 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(), CFDE_TextOut::DrawLogicText(), CXFA_TextLayout::DrawString(), TEST(), and TEST().
|
protected |
Definition at line 499 of file cfx_renderdevice.cpp.
|
inline |
Definition at line 98 of file cfx_renderdevice.h.
References kNormal, and SetDIBitsWithBlend().
Referenced by DrawNormalText().
bool CFX_RenderDevice::SetDIBitsWithBlend | ( | const RetainPtr< const CFX_DIBBase > & | pBitmap, |
int | left, | ||
int | top, | ||
BlendMode | blend_mode ) |
Definition at line 891 of file cfx_renderdevice.cpp.
References FX_RECT::FX_RECT(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), kRgb32, FX_RECT::left, FX_RECT::top, and FX_RECT::Width().
Referenced by SetDIBits().
bool CFX_RenderDevice::StartDIBits | ( | RetainPtr< const CFX_DIBBase > | bitmap, |
float | alpha, | ||
uint32_t | argb, | ||
const CFX_Matrix & | matrix, | ||
const FXDIB_ResampleOptions & | options, | ||
std::unique_ptr< CFX_ImageRenderer > * | handle ) |
Definition at line 996 of file cfx_renderdevice.cpp.
bool CFX_RenderDevice::StartDIBitsWithBlend | ( | RetainPtr< const CFX_DIBBase > | bitmap, |
float | alpha, | ||
uint32_t | argb, | ||
const CFX_Matrix & | matrix, | ||
const FXDIB_ResampleOptions & | options, | ||
std::unique_ptr< CFX_ImageRenderer > * | handle, | ||
BlendMode | blend_mode ) |
Definition at line 1006 of file cfx_renderdevice.cpp.
bool CFX_RenderDevice::StretchBitMask | ( | RetainPtr< CFX_DIBBase > | bitmap, |
int | left, | ||
int | top, | ||
int | dest_width, | ||
int | dest_height, | ||
uint32_t | color ) |
Definition at line 970 of file cfx_renderdevice.cpp.
References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), and 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 980 of file cfx_renderdevice.cpp.
References FX_RECT::FX_RECT(), and FX_RECT::Intersect().
Referenced by StretchBitMask().
bool CFX_RenderDevice::StretchDIBits | ( | RetainPtr< const CFX_DIBBase > | bitmap, |
int | left, | ||
int | top, | ||
int | dest_width, | ||
int | dest_height ) |
Definition at line 935 of file cfx_renderdevice.cpp.
References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), kNormal, and 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 945 of file cfx_renderdevice.cpp.
References FX_RECT::FX_RECT(), and FX_RECT::Intersect().
Referenced by StretchDIBits().