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_DIBBase Class Referenceabstract

#include <cfx_dibbase.h>

+ Inheritance diagram for CFX_DIBBase:
+ Collaboration diagram for CFX_DIBBase:

Public Member Functions

virtual pdfium::span< const uint8_t > GetScanline (int line) const =0
 
virtual bool SkipToScanline (int line, PauseIndicatorIface *pPause) const
 
virtual size_t GetEstimatedImageMemoryBurden () 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 Attributes

static constexpr FXDIB_Format kPlatformRGBFormat = FXDIB_Format::kRgb
 
static constexpr uint32_t kPaletteSize = 256
 

Protected Member Functions

 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

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

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 33 of file cfx_dibbase.h.

Constructor & Destructor Documentation

◆ CFX_DIBBase()

CFX_DIBBase::CFX_DIBBase ( )
protecteddefault

◆ ~CFX_DIBBase()

CFX_DIBBase::~CFX_DIBBase ( )
overrideprotecteddefault

Member Function Documentation

◆ BuildPalette()

void CFX_DIBBase::BuildPalette ( )
protected

Definition at line 700 of file cfx_dibbase.cpp.

References GetBPP(), and HasPalette().

Referenced by SetPaletteArgb().

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

◆ ClipTo()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::ClipTo ( const FX_RECT & rect) const

Definition at line 640 of file cfx_dibbase.cpp.

References ClipToInternal().

+ Here is the call graph for this function:

◆ ClipToInternal()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::ClipToInternal ( const FX_RECT * pClip) const
protected

Definition at line 644 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, GetBPP(), GetBppFromFormat(), GetFormat(), GetScanline(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), FX_RECT::left, m_Format, m_Height, m_Width, FX_RECT::top, and FX_RECT::Width().

Referenced by ClipTo(), and Realize().

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

◆ CloneAlphaMask()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::CloneAlphaMask ( ) const

Definition at line 871 of file cfx_dibbase.cpp.

References GetFormat(), GetScanline(), k8bppMask, kArgb, m_Height, and m_Width.

+ Here is the call graph for this function:

◆ ConvertBuffer()

DataVector< uint32_t > CFX_DIBBase::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 )
staticprotected

Definition at line 1083 of file cfx_dibbase.cpp.

References GetBppFromFormat(), k8bppMask, k8bppRgb, kArgb, kRgb, and kRgb32.

+ Here is the call graph for this function:

◆ ConvertTo()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::ConvertTo ( FXDIB_Format format) const

Definition at line 941 of file cfx_dibbase.cpp.

References kArgb, m_Height, and m_Width.

◆ FindPalette()

int CFX_DIBBase::FindPalette ( uint32_t color) const
protected

Definition at line 744 of file cfx_dibbase.cpp.

References GetBPP(), and HasPalette().

Referenced by CFX_DIBitmap::Clear().

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

◆ FlipImage()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::FlipImage ( bool bXFlip,
bool bYFlip ) const

Definition at line 888 of file cfx_dibbase.cpp.

References GetBppFromFormat(), GetFormat(), GetScanline(), m_Format, m_Height, m_Pitch, and m_Width.

+ Here is the call graph for this function:

◆ GetBPP()

int CFX_DIBBase::GetBPP ( ) const
inline

Definition at line 57 of file cfx_dibbase.h.

References GetBppFromFormat(), and m_Format.

Referenced by BuildPalette(), ClipToInternal(), CFX_DIBitmap::CompositeMask(), CFX_DIBitmap::CompositeOneBPPMask(), FindPalette(), GetPaletteArgb(), CFX_DIBitmap::SetUniformOpaqueAlpha(), SwapXY(), TakePalette(), and CFX_DIBitmap::TransferBitmap().

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

◆ GetEstimatedImageMemoryBurden()

size_t CFX_DIBBase::GetEstimatedImageMemoryBurden ( ) const
virtual

Reimplemented in CFX_DIBitmap, and CPDF_DIB.

Definition at line 626 of file cfx_dibbase.cpp.

◆ GetFormat()

FXDIB_Format CFX_DIBBase::GetFormat ( ) const
inline

Definition at line 56 of file cfx_dibbase.h.

References m_Format.

Referenced by CFX_DIBitmap::Clear(), ClipToInternal(), CloneAlphaMask(), CFX_DIBitmap::CompositeBitmap(), CFX_DIBitmap::CompositeRect(), FlipImage(), FPDFBitmap_GetFormat(), CFX_DIBitmap::MultiplyAlpha(), CFX_DIBitmap::MultiplyAlphaMask(), CFX_DIBitmap::SetUniformOpaqueAlpha(), SwapXY(), and CFX_DIBitmap::TransferBitmap().

+ Here is the caller graph for this function:

◆ GetHeight()

int CFX_DIBBase::GetHeight ( ) const
inline

Definition at line 53 of file cfx_dibbase.h.

References m_Height.

Referenced by FPDFBitmap_GetHeight(), and CFX_DIBitmap::GetEstimatedImageMemoryBurden().

+ Here is the caller graph for this function:

◆ GetOverlapRect()

bool CFX_DIBBase::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

Definition at line 761 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, CFX_ClipRgn::GetBox(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), FX_RECT::left, m_Height, m_Width, FX_RECT::right, FX_RECT::top, and FX_RECT::Width().

Referenced by CFX_DIBitmap::CompositeBitmap(), CFX_DIBitmap::CompositeOneBPPMask(), and CFX_DIBitmap::TransferBitmap().

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

◆ GetPaletteArgb()

uint32_t CFX_DIBBase::GetPaletteArgb ( int index) const

Definition at line 727 of file cfx_dibbase.cpp.

References ArgbEncode(), and GetBPP().

+ Here is the call graph for this function:

◆ GetPaletteSpan()

pdfium::span< const uint32_t > CFX_DIBBase::GetPaletteSpan ( ) const
inline

Definition at line 63 of file cfx_dibbase.h.

◆ GetPitch()

uint32_t CFX_DIBBase::GetPitch ( ) const
inline

Definition at line 54 of file cfx_dibbase.h.

References m_Pitch.

Referenced by FPDFBitmap_GetStride(), and CFX_DIBitmap::GetEstimatedImageMemoryBurden().

+ Here is the caller graph for this function:

◆ GetRequiredPaletteSize()

size_t CFX_DIBBase::GetRequiredPaletteSize ( ) const

Definition at line 713 of file cfx_dibbase.cpp.

References GetBppFromFormat(), IsMaskFormat(), and m_Format.

+ Here is the call graph for this function:

◆ GetScanline()

virtual pdfium::span< const uint8_t > CFX_DIBBase::GetScanline ( int line) const
pure virtual

Implemented in CFX_DIBitmap, CPDF_DIB, and CPDF_TransferFuncDIB.

Referenced by ClipToInternal(), CloneAlphaMask(), FlipImage(), and SwapXY().

+ Here is the caller graph for this function:

◆ GetWidth()

int CFX_DIBBase::GetWidth ( ) const
inline

Definition at line 52 of file cfx_dibbase.h.

References m_Width.

Referenced by FPDFBitmap_GetWidth().

+ Here is the caller graph for this function:

◆ HasPalette()

bool CFX_DIBBase::HasPalette ( ) const
inline

Definition at line 62 of file cfx_dibbase.h.

Referenced by BuildPalette(), CFX_DIBitmap::CompositeRect(), CFX_DIBitmap::ConvertFormat(), FindPalette(), and CPDF_DIB::GetScanline().

+ Here is the caller graph for this function:

◆ IsAlphaFormat()

bool CFX_DIBBase::IsAlphaFormat ( ) const
inline

Definition at line 59 of file cfx_dibbase.h.

References kArgb, and m_Format.

Referenced by CFX_DIBitmap::CompositeRect(), and IsOpaqueImage().

+ Here is the caller graph for this function:

◆ IsMaskFormat()

bool CFX_DIBBase::IsMaskFormat ( ) const
inline

Definition at line 58 of file cfx_dibbase.h.

References GetIsMaskFromFormat(), and m_Format.

Referenced by CFX_DIBitmap::CompositeRect(), GetRequiredPaletteSize(), IsOpaqueImage(), CFX_DIBitmap::MultiplyAlphaMask(), and CFX_DIBitmap::SetUniformOpaqueAlpha().

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

◆ IsOpaqueImage()

bool CFX_DIBBase::IsOpaqueImage ( ) const
inline

Definition at line 60 of file cfx_dibbase.h.

References IsAlphaFormat(), and IsMaskFormat().

Referenced by CFX_DIBitmap::MultiplyAlphaMask().

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

◆ Realize()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::Realize ( ) const

Definition at line 636 of file cfx_dibbase.cpp.

References ClipToInternal().

+ Here is the call graph for this function:

◆ SetPalette()

void CFX_DIBBase::SetPalette ( pdfium::span< const uint32_t > src_palette)

Definition at line 855 of file cfx_dibbase.cpp.

Referenced by CFX_DIBitmap::Copy().

+ Here is the caller graph for this function:

◆ SetPaletteArgb()

void CFX_DIBBase::SetPaletteArgb ( int index,
uint32_t color )

Definition at line 738 of file cfx_dibbase.cpp.

References BuildPalette().

+ Here is the call graph for this function:

◆ SkipToScanline()

bool CFX_DIBBase::SkipToScanline ( int line,
PauseIndicatorIface * pPause ) const
virtual

Reimplemented in CPDF_DIB.

Definition at line 622 of file cfx_dibbase.cpp.

◆ StretchTo()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::StretchTo ( int dest_width,
int dest_height,
const FXDIB_ResampleOptions & options,
const FX_RECT * pClip ) const

Definition at line 1057 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), CFX_ImageStretcher::Continue(), CFX_BitmapStorer::Detach(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), and CFX_ImageStretcher::Start().

+ Here is the call graph for this function:

◆ SwapXY()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::SwapXY ( bool bXFlip,
bool bYFlip ) const

Definition at line 965 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, GetBPP(), GetFormat(), GetScanline(), FX_RECT::Height(), FX_RECT::IsEmpty(), FX_RECT::left, m_Height, m_Width, FX_RECT::right, FX_RECT::top, and FX_RECT::Width().

+ Here is the call graph for this function:

◆ TakePalette()

void CFX_DIBBase::TakePalette ( DataVector< uint32_t > src_palette)

Definition at line 859 of file cfx_dibbase.cpp.

References GetBPP(), and kPaletteSize.

+ Here is the call graph for this function:

◆ TransformTo()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::TransformTo ( const CFX_Matrix & mtDest,
int * left,
int * top ) const

Definition at line 1045 of file cfx_dibbase.cpp.

References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), CFX_ImageTransformer::Continue(), CFX_ImageTransformer::DetachBitmap(), FX_RECT::left, CFX_ImageTransformer::result(), and FX_RECT::top.

+ Here is the call graph for this function:

Member Data Documentation

◆ kPaletteSize

uint32_t CFX_DIBBase::kPaletteSize = 256
staticconstexpr

Definition at line 42 of file cfx_dibbase.h.

Referenced by TakePalette().

◆ kPlatformRGBFormat

FXDIB_Format CFX_DIBBase::kPlatformRGBFormat = FXDIB_Format::kRgb
staticconstexpr

Definition at line 39 of file cfx_dibbase.h.

◆ m_Format

◆ m_Height

◆ m_palette

DataVector<uint32_t> CFX_DIBBase::m_palette
protected

Definition at line 135 of file cfx_dibbase.h.

◆ m_Pitch

uint32_t CFX_DIBBase::m_Pitch = 0
protected

◆ m_Width


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