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_DIBitmap Class Referencefinal

#include <cfx_dibitmap.h>

Inheritance diagram for CFX_DIBitmap:
Collaboration diagram for CFX_DIBitmap:

Classes

struct  PitchAndSize

Public Member Functions

bool Create (int width, int height, FXDIB_Format format)
bool Create (int width, int height, FXDIB_Format format, uint8_t *pBuffer, uint32_t pitch)
bool Copy (RetainPtr< const CFX_DIBBase > source)
pdfium::span< const uint8_t > GetScanline (int line) const override
size_t GetEstimatedImageMemoryBurden () const override
pdfium::span< const uint8_t > GetBuffer () const
pdfium::span< uint8_t > GetWritableBuffer ()
pdfium::span< uint8_t > GetWritableScanline (int line)
template<typename T>
pdfium::span< T > GetWritableScanlineAs (int line)
void TakeOver (RetainPtr< CFX_DIBitmap > &&pSrcBitmap)
bool ConvertFormat (FXDIB_Format format)
void Clear (uint32_t color)
void SetRedFromAlpha ()
void SetUniformOpaqueAlpha ()
bool MultiplyAlpha (float alpha)
bool MultiplyAlphaMask (RetainPtr< const CFX_DIBitmap > mask)
bool TransferBitmap (int width, int height, RetainPtr< const CFX_DIBBase > source, int src_left, int src_top)
bool CompositeBitmap (int dest_left, int dest_top, int width, int height, RetainPtr< const CFX_DIBBase > source, int src_left, int src_top, BlendMode blend_type, const CFX_AggClipRgn *pClipRgn, bool bRgbByteOrder)
bool CompositeMask (int dest_left, int dest_top, int width, int height, RetainPtr< const CFX_DIBBase > pMask, uint32_t color, int src_left, int src_top, BlendMode blend_type, const CFX_AggClipRgn *pClipRgn, bool bRgbByteOrder)
void CompositeOneBPPMask (int dest_left, int dest_top, int width, int height, RetainPtr< const CFX_DIBBase > source, int src_left, int src_top)
bool CompositeRect (int dest_left, int dest_top, int width, int height, uint32_t color)
bool ConvertColorScale (uint32_t forecolor, uint32_t backcolor)
Public Member Functions inherited from CFX_DIBBase
virtual bool SkipToScanline (int line, PauseIndicatorIface *pPause) const
template<typename T>
pdfium::span< const T > GetScanlineAs (int line) const
int GetWidth () const
int GetHeight () const
uint32_t GetPitch () const
FXDIB_Format GetFormat () const
int GetBPP () const
bool IsMaskFormat () const
bool IsAlphaFormat () const
bool IsOpaqueImage () const
bool HasPalette () const
pdfium::span< const uint32_t > GetPaletteSpan () const
size_t GetRequiredPaletteSize () const
uint32_t GetPaletteArgb (int index) const
void SetPaletteArgb (int index, uint32_t color)
void SetPalette (pdfium::span< const uint32_t > src_palette)
void TakePalette (DataVector< uint32_t > src_palette)
RetainPtr< CFX_DIBitmapRealize () const
RetainPtr< CFX_DIBitmapClipTo (const FX_RECT &rect) const
RetainPtr< CFX_DIBitmapConvertTo (FXDIB_Format format) const
RetainPtr< CFX_DIBitmapStretchTo (int dest_width, int dest_height, const FXDIB_ResampleOptions &options, const FX_RECT *pClip) const
RetainPtr< CFX_DIBitmapTransformTo (const CFX_Matrix &mtDest, int *left, int *top) const
RetainPtr< CFX_DIBitmapSwapXY (bool bXFlip, bool bYFlip) const
RetainPtr< CFX_DIBitmapFlipImage (bool bXFlip, bool bYFlip) const
RetainPtr< CFX_DIBitmapCloneAlphaMask () const
bool GetOverlapRect (int &dest_left, int &dest_top, int &width, int &height, int src_width, int src_height, int &src_left, int &src_top, const CFX_AggClipRgn *pClipRgn) const
bool IsPremultiplied () const
Public Member Functions inherited from fxcrt::Retainable
 Retainable ()=default
bool HasOneRef () const

Static Public Member Functions

static std::optional< PitchAndSizeCalculatePitchAndSize (int width, int height, FXDIB_Format format, uint32_t pitch)

Public Attributes

 CONSTRUCT_VIA_MAKE_RETAIN

Private Member Functions

 ~CFX_DIBitmap () override

Additional Inherited Members

Public Types inherited from CFX_DIBBase
using kPlatformRGBStruct = FX_BGR_STRUCT<uint8_t>
Static Public Attributes inherited from CFX_DIBBase
static constexpr FXDIB_Format kPlatformRGBFormat = FXDIB_Format::kBgr
static constexpr uint32_t kPaletteSize = 256
Protected Member Functions inherited from CFX_DIBBase
 CFX_DIBBase ()
 ~CFX_DIBBase () override
RetainPtr< CFX_DIBitmapClipToInternal (const FX_RECT *pClip) const
void BuildPalette ()
int FindPalette (uint32_t color) const
void SetFormat (FXDIB_Format format)
void SetWidth (int width)
void SetHeight (int height)
void SetPitch (uint32_t pitch)
Protected Member Functions inherited from fxcrt::Retainable
virtual ~Retainable ()=default
Static Protected Member Functions inherited from CFX_DIBBase
static DataVector< uint32_t > ConvertBuffer (FXDIB_Format dest_format, pdfium::span< uint8_t > dest_buf, int dest_pitch, int width, int height, const RetainPtr< const CFX_DIBBase > &pSrcBitmap, int src_left, int src_top)
Protected Attributes inherited from CFX_DIBBase
DataVector< uint32_t > palette_

Detailed Description

Definition at line 24 of file cfx_dibitmap.h.

Member Function Documentation

◆ ~CFX_DIBitmap()

CFX_DIBitmap::~CFX_DIBitmap ( )
overrideprivatedefault

◆ CalculatePitchAndSize()

std::optional< CFX_DIBitmap::PitchAndSize > CFX_DIBitmap::CalculatePitchAndSize ( int width,
int height,
FXDIB_Format format,
uint32_t pitch )
static

Definition at line 520 of file cfx_dibitmap.cpp.

References GetBppFromFormat().

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

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

◆ Clear()

void CFX_DIBitmap::Clear ( uint32_t color)

Definition at line 148 of file cfx_dibitmap.cpp.

References CFX_DIBBase::FindPalette(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), k1bppMask, k1bppRgb, k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, kInvalid, and CFX_DefaultRenderDevice::UseSkiaRenderer().

Here is the call graph for this function:

◆ CompositeBitmap()

bool CFX_DIBitmap::CompositeBitmap ( int dest_left,
int dest_top,
int width,
int height,
RetainPtr< const CFX_DIBBase > source,
int src_left,
int src_top,
BlendMode blend_type,
const CFX_AggClipRgn * pClipRgn,
bool bRgbByteOrder )

Definition at line 554 of file cfx_dibitmap.cpp.

References CFX_AggClipRgn::GetBox(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetOverlapRect(), CFX_AggClipRgn::GetType(), CFX_AggClipRgn::kRectI, FX_RECT::left, FX_RECT::operator=(), and FX_RECT::top.

Here is the call graph for this function:

◆ CompositeMask()

bool CFX_DIBitmap::CompositeMask ( int dest_left,
int dest_top,
int width,
int height,
RetainPtr< const CFX_DIBBase > pMask,
uint32_t color,
int src_left,
int src_top,
BlendMode blend_type,
const CFX_AggClipRgn * pClipRgn,
bool bRgbByteOrder )

Definition at line 620 of file cfx_dibitmap.cpp.

References CFX_AggClipRgn::GetBox(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetOverlapRect(), CFX_AggClipRgn::GetType(), CFX_AggClipRgn::kRectI, FX_RECT::left, FX_RECT::operator=(), and FX_RECT::top.

Here is the call graph for this function:

◆ CompositeOneBPPMask()

void CFX_DIBitmap::CompositeOneBPPMask ( int dest_left,
int dest_top,
int width,
int height,
RetainPtr< const CFX_DIBBase > source,
int src_left,
int src_top )

Definition at line 683 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetBPP(), and CFX_DIBBase::GetOverlapRect().

Here is the call graph for this function:

◆ CompositeRect()

bool CFX_DIBitmap::CompositeRect ( int dest_left,
int dest_top,
int width,
int height,
uint32_t color )

◆ ConvertColorScale()

bool CFX_DIBitmap::ConvertColorScale ( uint32_t forecolor,
uint32_t backcolor )

Definition at line 511 of file cfx_dibitmap.cpp.

◆ ConvertFormat()

bool CFX_DIBitmap::ConvertFormat ( FXDIB_Format format)

Definition at line 875 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetFormat(), CFX_DIBBase::HasPalette(), k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, CFX_DIBBase::SetFormat(), CFX_DIBBase::SetPitch(), and SetUniformOpaqueAlpha().

Referenced by MultiplyAlpha(), and MultiplyAlphaMask().

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

◆ Copy()

bool CFX_DIBitmap::Copy ( RetainPtr< const CFX_DIBBase > source)

Definition at line 85 of file cfx_dibitmap.cpp.

◆ Create() [1/2]

bool CFX_DIBitmap::Create ( int width,
int height,
FXDIB_Format format )
nodiscard

Definition at line 44 of file cfx_dibitmap.cpp.

References Create().

Here is the call graph for this function:

◆ Create() [2/2]

bool CFX_DIBitmap::Create ( int width,
int height,
FXDIB_Format format,
uint8_t * pBuffer,
uint32_t pitch )
nodiscard

Definition at line 48 of file cfx_dibitmap.cpp.

References CFX_DIBBase::SetFormat(), CFX_DIBBase::SetHeight(), CFX_DIBBase::SetPitch(), and CFX_DIBBase::SetWidth().

Referenced by Create().

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

◆ GetBuffer()

pdfium::span< const uint8_t > CFX_DIBitmap::GetBuffer ( ) const

Definition at line 103 of file cfx_dibitmap.cpp.

◆ GetEstimatedImageMemoryBurden()

size_t CFX_DIBitmap::GetEstimatedImageMemoryBurden ( ) const
overridevirtual

Reimplemented from CFX_DIBBase.

Definition at line 119 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetHeight(), and CFX_DIBBase::GetPitch().

Here is the call graph for this function:

◆ GetScanline()

pdfium::span< const uint8_t > CFX_DIBitmap::GetScanline ( int line) const
overridevirtual

Implements CFX_DIBBase.

Definition at line 111 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetPitch().

Here is the call graph for this function:

◆ GetWritableBuffer()

pdfium::span< uint8_t > CFX_DIBitmap::GetWritableBuffer ( )
inline

Definition at line 66 of file cfx_dibitmap.h.

◆ GetWritableScanline()

pdfium::span< uint8_t > CFX_DIBitmap::GetWritableScanline ( int line)
inline

Definition at line 74 of file cfx_dibitmap.h.

◆ GetWritableScanlineAs()

template<typename T>
pdfium::span< T > CFX_DIBitmap::GetWritableScanlineAs ( int line)
inline

Definition at line 84 of file cfx_dibitmap.h.

◆ MultiplyAlpha()

bool CFX_DIBitmap::MultiplyAlpha ( float alpha)

Definition at line 380 of file cfx_dibitmap.cpp.

References ConvertFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), CFX_DIBBase::IsMaskFormat(), and kBgra.

Here is the call graph for this function:

◆ MultiplyAlphaMask()

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

Definition at line 342 of file cfx_dibitmap.cpp.

References ConvertFormat(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), k8bppMask, kBgra, and kBgrx.

Here is the call graph for this function:

◆ SetRedFromAlpha()

void CFX_DIBitmap::SetRedFromAlpha ( )

Definition at line 316 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), and kBgra.

Here is the call graph for this function:

◆ SetUniformOpaqueAlpha()

void CFX_DIBitmap::SetUniformOpaqueAlpha ( )

Definition at line 329 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), and kBgra.

Referenced by ConvertFormat().

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

◆ TakeOver()

void CFX_DIBitmap::TakeOver ( RetainPtr< CFX_DIBitmap > && pSrcBitmap)

Definition at line 138 of file cfx_dibitmap.cpp.

◆ TransferBitmap()

bool CFX_DIBitmap::TransferBitmap ( int width,
int height,
RetainPtr< const CFX_DIBBase > source,
int src_left,
int src_top )

Definition at line 206 of file cfx_dibitmap.cpp.

References CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), and CFX_DIBBase::GetOverlapRect().

Here is the call graph for this function:

Member Data Documentation

◆ CONSTRUCT_VIA_MAKE_RETAIN

CFX_DIBitmap::CONSTRUCT_VIA_MAKE_RETAIN

Definition at line 47 of file cfx_dibitmap.h.


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