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)
 
void TakeOver (RetainPtr< CFX_DIBitmap > &&pSrcBitmap)
 
bool ConvertFormat (FXDIB_Format format)
 
void Clear (uint32_t color)
 
bool SetRedFromBitmap (RetainPtr< const CFX_DIBBase > source)
 
bool SetAlphaFromBitmap (RetainPtr< const CFX_DIBBase > source)
 
bool SetUniformOpaqueAlpha ()
 
bool MultiplyAlpha (float alpha)
 
bool MultiplyAlphaMask (RetainPtr< const CFX_DIBBase > source)
 
bool TransferBitmap (int dest_left, int dest_top, 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_ClipRgn *pClipRgn, bool bRgbByteOrder)
 
bool CompositeMask (int dest_left, int dest_top, int width, int height, const RetainPtr< const CFX_DIBBase > &pMask, uint32_t color, int src_left, int src_top, BlendMode blend_type, const CFX_ClipRgn *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
 
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_ClipRgn *pClipRgn) const
 
- Public Member Functions inherited from fxcrt::Retainable
 Retainable ()=default
 
bool HasOneRef () const
 

Static Public Member Functions

static absl::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

- Static Public Attributes inherited from CFX_DIBBase
static constexpr FXDIB_Format kPlatformRGBFormat = FXDIB_Format::kRgb
 
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
 
- 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
FXDIB_Format m_Format = FXDIB_Format::kInvalid
 
int m_Width = 0
 
int m_Height = 0
 
uint32_t m_Pitch = 0
 
DataVector< uint32_t > m_palette
 

Detailed Description

Definition at line 18 of file cfx_dibitmap.h.

Member Function Documentation

◆ ~CFX_DIBitmap()

CFX_DIBitmap::~CFX_DIBitmap ( )
overrideprivatedefault

◆ CalculatePitchAndSize()

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

Definition at line 606 of file cfx_dibitmap.cpp.

References GetBppFromFormat().

+ Here is the call graph for this function:

◆ Clear()

void CFX_DIBitmap::Clear ( uint32_t color)

Definition at line 133 of file cfx_dibitmap.cpp.

References CFX_DIBBase::FindPalette(), CFX_DIBBase::GetFormat(), k1bppMask, k1bppRgb, k8bppMask, k8bppRgb, kArgb, kRgb, kRgb32, CFX_DIBBase::m_Height, CFX_DIBBase::m_Pitch, CFX_DIBBase::m_Width, 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_ClipRgn * pClipRgn,
bool bRgbByteOrder )

◆ CompositeMask()

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

Definition at line 703 of file cfx_dibitmap.cpp.

References CFX_ScanlineCompositor::CompositeBitMaskLine(), CFX_ScanlineCompositor::CompositeByteMaskLine(), CFX_ClipRgn::GetBox(), CFX_DIBBase::GetBPP(), GetBppFromFormat(), CFX_ClipRgn::GetType(), CFX_ClipRgn::kRectI, FX_RECT::left, CFX_DIBBase::m_Format, 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 765 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 597 of file cfx_dibitmap.cpp.

◆ ConvertFormat()

bool CFX_DIBitmap::ConvertFormat ( FXDIB_Format format)

Definition at line 934 of file cfx_dibitmap.cpp.

References fxge::CalculatePitch32OrDie(), GetBppFromFormat(), CFX_DIBBase::HasPalette(), k8bppMask, k8bppRgb, kArgb, kRgb32, CFX_DIBBase::m_Format, CFX_DIBBase::m_Height, CFX_DIBBase::m_Pitch, and CFX_DIBBase::m_Width.

Referenced by MultiplyAlpha(), MultiplyAlphaMask(), and SetUniformOpaqueAlpha().

+ 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 71 of file cfx_dibitmap.cpp.

References CFX_DIBBase::SetPalette().

+ Here is the call graph for this function:

◆ Create() [1/2]

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

Definition at line 32 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 )

Definition at line 36 of file cfx_dibitmap.cpp.

References CFX_DIBBase::m_Format, CFX_DIBBase::m_Height, CFX_DIBBase::m_Pitch, and CFX_DIBBase::m_Width.

Referenced by Create().

+ Here is the caller graph for this function:

◆ GetBuffer()

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

Definition at line 89 of file cfx_dibitmap.cpp.

◆ GetEstimatedImageMemoryBurden()

size_t CFX_DIBitmap::GetEstimatedImageMemoryBurden ( ) const
overridevirtual

Reimplemented from CFX_DIBBase.

Definition at line 104 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 96 of file cfx_dibitmap.cpp.

References CFX_DIBBase::m_Pitch.

◆ GetWritableBuffer()

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

Definition at line 44 of file cfx_dibitmap.h.

◆ GetWritableScanline()

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

Definition at line 49 of file cfx_dibitmap.h.

◆ MultiplyAlpha()

bool CFX_DIBitmap::MultiplyAlpha ( float alpha)

Definition at line 454 of file cfx_dibitmap.cpp.

References ConvertFormat(), CFX_DIBBase::GetFormat(), k1bppMask, k8bppMask, kArgb, CFX_DIBBase::m_Height, CFX_DIBBase::m_Width, and MultiplyAlpha().

Referenced by MultiplyAlpha().

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

◆ MultiplyAlphaMask()

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

Definition at line 399 of file cfx_dibitmap.cpp.

References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), ConvertFormat(), CFX_DIBBase::GetFormat(), CFX_DIBBase::IsMaskFormat(), CFX_DIBBase::IsOpaqueImage(), k8bppMask, kArgb, CFX_DIBBase::m_Height, CFX_DIBBase::m_Width, and SetAlphaFromBitmap().

+ Here is the call graph for this function:

◆ SetAlphaFromBitmap()

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

Definition at line 364 of file cfx_dibitmap.cpp.

Referenced by MultiplyAlphaMask().

+ Here is the caller graph for this function:

◆ SetRedFromBitmap()

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

Definition at line 368 of file cfx_dibitmap.cpp.

◆ SetUniformOpaqueAlpha()

bool CFX_DIBitmap::SetUniformOpaqueAlpha ( )

Definition at line 372 of file cfx_dibitmap.cpp.

References ConvertFormat(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::IsMaskFormat(), k8bppMask, kArgb, CFX_DIBBase::m_Height, and CFX_DIBBase::m_Width.

+ Here is the call graph for this function:

◆ TakeOver()

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

Definition at line 123 of file cfx_dibitmap.cpp.

◆ TransferBitmap()

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

Definition at line 195 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 25 of file cfx_dibitmap.h.


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