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 Types

using kPlatformRGBStruct = FX_BGR_STRUCT<uint8_t>

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
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 Attributes

static constexpr FXDIB_Format kPlatformRGBFormat = FXDIB_Format::kBgr
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
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

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

DataVector< uint32_t > palette_

Detailed Description

Definition at line 35 of file cfx_dibbase.h.

Member Typedef Documentation

◆ kPlatformRGBStruct

Definition at line 43 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 621 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 559 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 563 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, GetBPP(), GetFormat(), GetHeight(), GetPitch(), GetWidth(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), FX_RECT::left, 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 793 of file cfx_dibbase.cpp.

References GetFormat(), GetHeight(), GetWidth(), k8bppMask, and kBgra.

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 1082 of file cfx_dibbase.cpp.

References k1bppMask, k1bppRgb, k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, and kInvalid.

◆ ConvertTo()

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

Definition at line 911 of file cfx_dibbase.cpp.

References GetFormat(), GetHeight(), GetWidth(), k8bppRgb, and kBgr.

Here is the call graph for this function:

◆ FindPalette()

int CFX_DIBBase::FindPalette ( uint32_t color) const
protected

Definition at line 665 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 815 of file cfx_dibbase.cpp.

References FXSYS_memcpy(), FXSYS_memset(), GetBPP(), GetFormat(), GetHeight(), GetPitch(), and GetWidth().

Here is the call graph for this function:

◆ GetBPP()

int CFX_DIBBase::GetBPP ( ) const
inline

Definition at line 72 of file cfx_dibbase.h.

References GetBppFromFormat(), and GetFormat().

Referenced by BuildPalette(), ClipToInternal(), CFX_DIBitmap::CompositeBitmap(), CFX_DIBitmap::CompositeMask(), CFX_DIBitmap::CompositeOneBPPMask(), CFX_DIBitmap::CompositeRect(), FindPalette(), FlipImage(), GetPaletteArgb(), GetRequiredPaletteSize(), 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 545 of file cfx_dibbase.cpp.

◆ GetFormat()

FXDIB_Format CFX_DIBBase::GetFormat ( ) const
inline

◆ GetHeight()

int CFX_DIBBase::GetHeight ( ) const
inline

◆ 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_AggClipRgn * pClipRgn ) const

Definition at line 682 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, CFX_AggClipRgn::GetBox(), GetHeight(), GetWidth(), FX_RECT::Height(), FX_RECT::Intersect(), FX_RECT::IsEmpty(), FX_RECT::left, FX_RECT::right, FX_RECT::top, and FX_RECT::Width().

Referenced by CFX_DIBitmap::CompositeBitmap(), CFX_DIBitmap::CompositeMask(), 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 648 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 79 of file cfx_dibbase.h.

◆ GetPitch()

uint32_t CFX_DIBBase::GetPitch ( ) const
inline

Definition at line 67 of file cfx_dibbase.h.

Referenced by ClipToInternal(), FlipImage(), CFX_DIBitmap::GetEstimatedImageMemoryBurden(), and CFX_DIBitmap::GetScanline().

Here is the caller graph for this function:

◆ GetRequiredPaletteSize()

size_t CFX_DIBBase::GetRequiredPaletteSize ( ) const

Definition at line 634 of file cfx_dibbase.cpp.

References GetBPP(), and IsMaskFormat().

Here is the call graph for this function:

◆ GetScanline()

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

◆ GetScanlineAs()

template<typename T>
pdfium::span< const T > CFX_DIBBase::GetScanlineAs ( int line) const
inline

Definition at line 60 of file cfx_dibbase.h.

◆ GetWidth()

int CFX_DIBBase::GetWidth ( ) const
inline

Definition at line 65 of file cfx_dibbase.h.

Referenced by ClipToInternal(), CloneAlphaMask(), CFX_DIBitmap::CompositeRect(), ConvertTo(), FlipImage(), GetOverlapRect(), CPDF_DIB::GetScanline(), CFX_DIBitmap::MultiplyAlpha(), CFX_DIBitmap::MultiplyAlphaMask(), CFX_DIBitmap::SetRedFromAlpha(), CFX_DIBitmap::SetUniformOpaqueAlpha(), CPDF_DIB::StartLoadDIBBase(), StretchTo(), and SwapXY().

Here is the caller graph for this function:

◆ HasPalette()

bool CFX_DIBBase::HasPalette ( ) const
inline

Definition at line 78 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 75 of file cfx_dibbase.h.

References GetFormat(), and GetIsAlphaFromFormat().

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

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

◆ IsMaskFormat()

bool CFX_DIBBase::IsMaskFormat ( ) const
inline

Definition at line 74 of file cfx_dibbase.h.

References GetFormat(), and GetIsMaskFromFormat().

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

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

References IsAlphaFormat(), and IsMaskFormat().

Here is the call graph for this function:

◆ IsPremultiplied()

bool CFX_DIBBase::IsPremultiplied ( ) const
inline

Definition at line 117 of file cfx_dibbase.h.

◆ Realize()

RetainPtr< CFX_DIBitmap > CFX_DIBBase::Realize ( ) const

Definition at line 555 of file cfx_dibbase.cpp.

References ClipToInternal().

Here is the call graph for this function:

◆ SetFormat()

void CFX_DIBBase::SetFormat ( FXDIB_Format format)
inlineprotected

Definition at line 152 of file cfx_dibbase.h.

Referenced by CFX_DIBitmap::ConvertFormat(), and CFX_DIBitmap::Create().

Here is the caller graph for this function:

◆ SetHeight()

void CFX_DIBBase::SetHeight ( int height)
inlineprotected

Definition at line 154 of file cfx_dibbase.h.

Referenced by CFX_DIBitmap::Create().

Here is the caller graph for this function:

◆ SetPalette()

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

Definition at line 777 of file cfx_dibbase.cpp.

◆ SetPaletteArgb()

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

Definition at line 659 of file cfx_dibbase.cpp.

References BuildPalette().

Here is the call graph for this function:

◆ SetPitch()

void CFX_DIBBase::SetPitch ( uint32_t pitch)
inlineprotected

Definition at line 155 of file cfx_dibbase.h.

Referenced by CFX_DIBitmap::ConvertFormat(), and CFX_DIBitmap::Create().

Here is the caller graph for this function:

◆ SetWidth()

void CFX_DIBBase::SetWidth ( int width)
inlineprotected

Definition at line 153 of file cfx_dibbase.h.

Referenced by CFX_DIBitmap::Create().

Here is the caller graph for this function:

◆ SkipToScanline()

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

Reimplemented in CPDF_DIB.

Definition at line 541 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 1055 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), CFX_ImageStretcher::Continue(), CFX_BitmapStorer::Detach(), GetHeight(), GetWidth(), 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 931 of file cfx_dibbase.cpp.

References FX_RECT::FX_RECT(), FX_RECT::bottom, FXSYS_memcpy(), GetBPP(), GetFormat(), GetHeight(), GetWidth(), FX_RECT::Height(), FX_RECT::IsEmpty(), FX_RECT::left, 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 781 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 1043 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 46 of file cfx_dibbase.h.

Referenced by TakePalette().

◆ kPlatformRGBFormat

FXDIB_Format CFX_DIBBase::kPlatformRGBFormat = FXDIB_Format::kBgr
staticconstexpr

Definition at line 42 of file cfx_dibbase.h.

◆ palette_

DataVector<uint32_t> CFX_DIBBase::palette_
protected

Definition at line 157 of file cfx_dibbase.h.


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