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_dibitmap.h>
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_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 Member Functions | |
static absl::optional< PitchAndSize > | CalculatePitchAndSize (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_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 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 |
Definition at line 18 of file cfx_dibitmap.h.
|
overrideprivatedefault |
|
static |
Definition at line 606 of file cfx_dibitmap.cpp.
References GetBppFromFormat().
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().
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 ) |
Definition at line 640 of file cfx_dibitmap.cpp.
References CFX_ScanlineCompositor::CompositePalBitmapLine(), CFX_ScanlineCompositor::CompositeRgbBitmapLine(), CFX_ClipRgn::GetBox(), GetBppFromFormat(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetOverlapRect(), CFX_ClipRgn::GetType(), CFX_ScanlineCompositor::Init(), CFX_ClipRgn::kRectI, FX_RECT::left, CFX_DIBBase::m_Format, FX_RECT::operator=(), and FX_RECT::top.
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.
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().
bool CFX_DIBitmap::CompositeRect | ( | int | dest_left, |
int | dest_top, | ||
int | width, | ||
int | height, | ||
uint32_t | color ) |
Definition at line 794 of file cfx_dibitmap.cpp.
References FX_RECT::FX_RECT(), ArgbEncode(), FX_RECT::bottom, GetBppFromFormat(), CFX_DIBBase::GetFormat(), CFX_DIBBase::HasPalette(), FX_RECT::Intersect(), CFX_DIBBase::IsAlphaFormat(), FX_RECT::IsEmpty(), CFX_DIBBase::IsMaskFormat(), kArgb, FX_RECT::left, CFX_DIBBase::m_Format, CFX_DIBBase::m_Height, CFX_DIBBase::m_Width, FX_RECT::right, FX_RECT::top, and FX_RECT::Width().
bool CFX_DIBitmap::ConvertColorScale | ( | uint32_t | forecolor, |
uint32_t | backcolor ) |
Definition at line 597 of file cfx_dibitmap.cpp.
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().
bool CFX_DIBitmap::Copy | ( | RetainPtr< const CFX_DIBBase > | source | ) |
Definition at line 71 of file cfx_dibitmap.cpp.
References CFX_DIBBase::SetPalette().
bool CFX_DIBitmap::Create | ( | int | width, |
int | height, | ||
FXDIB_Format | format ) |
Definition at line 32 of file cfx_dibitmap.cpp.
References Create().
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().
pdfium::span< const uint8_t > CFX_DIBitmap::GetBuffer | ( | ) | const |
Definition at line 89 of file cfx_dibitmap.cpp.
|
overridevirtual |
Reimplemented from CFX_DIBBase.
Definition at line 104 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetHeight(), and CFX_DIBBase::GetPitch().
|
overridevirtual |
Implements CFX_DIBBase.
Definition at line 96 of file cfx_dibitmap.cpp.
References CFX_DIBBase::m_Pitch.
|
inline |
Definition at line 44 of file cfx_dibitmap.h.
|
inline |
Definition at line 49 of file cfx_dibitmap.h.
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().
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().
bool CFX_DIBitmap::SetAlphaFromBitmap | ( | RetainPtr< const CFX_DIBBase > | source | ) |
Definition at line 364 of file cfx_dibitmap.cpp.
Referenced by MultiplyAlphaMask().
bool CFX_DIBitmap::SetRedFromBitmap | ( | RetainPtr< const CFX_DIBBase > | source | ) |
Definition at line 368 of file cfx_dibitmap.cpp.
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.
void CFX_DIBitmap::TakeOver | ( | RetainPtr< CFX_DIBitmap > && | pSrcBitmap | ) |
Definition at line 123 of file cfx_dibitmap.cpp.
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().
CFX_DIBitmap::CONSTRUCT_VIA_MAKE_RETAIN |
Definition at line 25 of file cfx_dibitmap.h.