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_dibbase.h>
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_DIBitmap > | Realize () const |
RetainPtr< CFX_DIBitmap > | ClipTo (const FX_RECT &rect) const |
RetainPtr< CFX_DIBitmap > | ConvertTo (FXDIB_Format format) const |
RetainPtr< CFX_DIBitmap > | StretchTo (int dest_width, int dest_height, const FXDIB_ResampleOptions &options, const FX_RECT *pClip) const |
RetainPtr< CFX_DIBitmap > | TransformTo (const CFX_Matrix &mtDest, int *left, int *top) const |
RetainPtr< CFX_DIBitmap > | SwapXY (bool bXFlip, bool bYFlip) const |
RetainPtr< CFX_DIBitmap > | FlipImage (bool bXFlip, bool bYFlip) const |
RetainPtr< CFX_DIBitmap > | CloneAlphaMask () 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_DIBitmap > | ClipToInternal (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 |
Definition at line 33 of file cfx_dibbase.h.
|
protecteddefault |
|
overrideprotecteddefault |
|
protected |
Definition at line 700 of file cfx_dibbase.cpp.
References GetBPP(), and HasPalette().
Referenced by SetPaletteArgb().
RetainPtr< CFX_DIBitmap > CFX_DIBBase::ClipTo | ( | const FX_RECT & | rect | ) | const |
Definition at line 640 of file cfx_dibbase.cpp.
References ClipToInternal().
|
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().
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.
|
staticprotected |
Definition at line 1083 of file cfx_dibbase.cpp.
References GetBppFromFormat(), k8bppMask, k8bppRgb, kArgb, kRgb, and kRgb32.
RetainPtr< CFX_DIBitmap > CFX_DIBBase::ConvertTo | ( | FXDIB_Format | format | ) | const |
Definition at line 941 of file cfx_dibbase.cpp.
|
protected |
Definition at line 744 of file cfx_dibbase.cpp.
References GetBPP(), and HasPalette().
Referenced by CFX_DIBitmap::Clear().
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.
|
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().
|
virtual |
Reimplemented in CFX_DIBitmap, and CPDF_DIB.
Definition at line 626 of file cfx_dibbase.cpp.
|
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().
|
inline |
Definition at line 53 of file cfx_dibbase.h.
References m_Height.
Referenced by FPDFBitmap_GetHeight(), and CFX_DIBitmap::GetEstimatedImageMemoryBurden().
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().
uint32_t CFX_DIBBase::GetPaletteArgb | ( | int | index | ) | const |
Definition at line 727 of file cfx_dibbase.cpp.
References ArgbEncode(), and GetBPP().
|
inline |
Definition at line 63 of file cfx_dibbase.h.
|
inline |
Definition at line 54 of file cfx_dibbase.h.
References m_Pitch.
Referenced by FPDFBitmap_GetStride(), and CFX_DIBitmap::GetEstimatedImageMemoryBurden().
size_t CFX_DIBBase::GetRequiredPaletteSize | ( | ) | const |
Definition at line 713 of file cfx_dibbase.cpp.
References GetBppFromFormat(), IsMaskFormat(), and m_Format.
|
pure virtual |
Implemented in CFX_DIBitmap, CPDF_DIB, and CPDF_TransferFuncDIB.
Referenced by ClipToInternal(), CloneAlphaMask(), FlipImage(), and SwapXY().
|
inline |
Definition at line 52 of file cfx_dibbase.h.
References m_Width.
Referenced by FPDFBitmap_GetWidth().
|
inline |
Definition at line 62 of file cfx_dibbase.h.
Referenced by BuildPalette(), CFX_DIBitmap::CompositeRect(), CFX_DIBitmap::ConvertFormat(), FindPalette(), and CPDF_DIB::GetScanline().
|
inline |
Definition at line 59 of file cfx_dibbase.h.
References kArgb, and m_Format.
Referenced by CFX_DIBitmap::CompositeRect(), and IsOpaqueImage().
|
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().
|
inline |
Definition at line 60 of file cfx_dibbase.h.
References IsAlphaFormat(), and IsMaskFormat().
Referenced by CFX_DIBitmap::MultiplyAlphaMask().
RetainPtr< CFX_DIBitmap > CFX_DIBBase::Realize | ( | ) | const |
Definition at line 636 of file cfx_dibbase.cpp.
References ClipToInternal().
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().
void CFX_DIBBase::SetPaletteArgb | ( | int | index, |
uint32_t | color ) |
Definition at line 738 of file cfx_dibbase.cpp.
References BuildPalette().
|
virtual |
Reimplemented in CPDF_DIB.
Definition at line 622 of file cfx_dibbase.cpp.
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().
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().
void CFX_DIBBase::TakePalette | ( | DataVector< uint32_t > | src_palette | ) |
Definition at line 859 of file cfx_dibbase.cpp.
References GetBPP(), and kPaletteSize.
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.
|
staticconstexpr |
Definition at line 42 of file cfx_dibbase.h.
Referenced by TakePalette().
|
staticconstexpr |
Definition at line 39 of file cfx_dibbase.h.
|
protected |
Definition at line 131 of file cfx_dibbase.h.
Referenced by ClipToInternal(), CFX_DIBitmap::CompositeBitmap(), CFX_DIBitmap::CompositeMask(), CFX_DIBitmap::CompositeRect(), CFX_DIBitmap::ConvertFormat(), CFX_DIBitmap::Create(), FlipImage(), GetBPP(), GetFormat(), GetRequiredPaletteSize(), IsAlphaFormat(), and IsMaskFormat().
|
protected |
Definition at line 133 of file cfx_dibbase.h.
Referenced by CFX_DIBitmap::Clear(), ClipToInternal(), CloneAlphaMask(), CFX_DIBitmap::CompositeRect(), CFX_DIBitmap::ConvertFormat(), ConvertTo(), CFX_DIBitmap::Create(), FlipImage(), GetHeight(), GetOverlapRect(), CFX_DIBitmap::MultiplyAlpha(), CFX_DIBitmap::MultiplyAlphaMask(), CFX_DIBitmap::SetUniformOpaqueAlpha(), CPDF_DIB::StartLoadDIBBase(), and SwapXY().
|
protected |
Definition at line 135 of file cfx_dibbase.h.
|
protected |
Definition at line 134 of file cfx_dibbase.h.
Referenced by CFX_DIBitmap::Clear(), CFX_DIBitmap::ConvertFormat(), CFX_DIBitmap::Create(), FlipImage(), GetPitch(), and CFX_DIBitmap::GetScanline().
|
protected |
Definition at line 132 of file cfx_dibbase.h.
Referenced by CFX_DIBitmap::Clear(), ClipToInternal(), CloneAlphaMask(), CFX_DIBitmap::CompositeRect(), CFX_DIBitmap::ConvertFormat(), ConvertTo(), CFX_DIBitmap::Create(), FlipImage(), GetOverlapRect(), CPDF_DIB::GetScanline(), GetWidth(), CFX_DIBitmap::MultiplyAlpha(), CFX_DIBitmap::MultiplyAlphaMask(), CFX_DIBitmap::SetUniformOpaqueAlpha(), CPDF_DIB::StartLoadDIBBase(), and SwapXY().