![]() |
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) |
| template<typename T> | |
| pdfium::span< T > | GetWritableScanlineAs (int line) |
| void | TakeOver (RetainPtr< CFX_DIBitmap > &&pSrcBitmap) |
| bool | ConvertFormat (FXDIB_Format format) |
| void | Clear (uint32_t color) |
| void | SetRedFromAlpha () |
| void | SetUniformOpaqueAlpha () |
| bool | MultiplyAlpha (float alpha) |
| bool | MultiplyAlphaMask (RetainPtr< const CFX_DIBitmap > mask) |
| bool | TransferBitmap (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_AggClipRgn *pClipRgn, bool bRgbByteOrder) |
| bool | CompositeMask (int dest_left, int dest_top, int width, int height, RetainPtr< const CFX_DIBBase > pMask, uint32_t color, int src_left, int src_top, BlendMode blend_type, const CFX_AggClipRgn *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 |
| 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_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_AggClipRgn *pClipRgn) const |
| bool | IsPremultiplied () const |
| Public Member Functions inherited from fxcrt::Retainable | |
| Retainable ()=default | |
| bool | HasOneRef () const |
Static Public Member Functions | |
| static std::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 | |
| Public Types inherited from CFX_DIBBase | |
| using | kPlatformRGBStruct = FX_BGR_STRUCT<uint8_t> |
| Static Public Attributes inherited from CFX_DIBBase | |
| static constexpr FXDIB_Format | kPlatformRGBFormat = FXDIB_Format::kBgr |
| 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 |
| 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 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 | |
| DataVector< uint32_t > | palette_ |
Definition at line 24 of file cfx_dibitmap.h.
|
overrideprivatedefault |
|
static |
Definition at line 520 of file cfx_dibitmap.cpp.
References GetBppFromFormat().
Referenced by TEST(), TEST(), and TEST().
| void CFX_DIBitmap::Clear | ( | uint32_t | color | ) |
Definition at line 148 of file cfx_dibitmap.cpp.
References CFX_DIBBase::FindPalette(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), k1bppMask, k1bppRgb, k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, kInvalid, 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_AggClipRgn * | pClipRgn, | ||
| bool | bRgbByteOrder ) |
Definition at line 554 of file cfx_dibitmap.cpp.
References CFX_AggClipRgn::GetBox(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetOverlapRect(), CFX_AggClipRgn::GetType(), CFX_AggClipRgn::kRectI, FX_RECT::left, FX_RECT::operator=(), and FX_RECT::top.
| bool CFX_DIBitmap::CompositeMask | ( | int | dest_left, |
| int | dest_top, | ||
| int | width, | ||
| int | height, | ||
| RetainPtr< const CFX_DIBBase > | pMask, | ||
| uint32_t | color, | ||
| int | src_left, | ||
| int | src_top, | ||
| BlendMode | blend_type, | ||
| const CFX_AggClipRgn * | pClipRgn, | ||
| bool | bRgbByteOrder ) |
Definition at line 620 of file cfx_dibitmap.cpp.
References CFX_AggClipRgn::GetBox(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetOverlapRect(), CFX_AggClipRgn::GetType(), CFX_AggClipRgn::kRectI, FX_RECT::left, 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 683 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 712 of file cfx_dibitmap.cpp.
References FX_RECT::FX_RECT(), ArgbEncode(), FX_RECT::bottom, FXARGB_SetDIB(), FXSYS_memset(), CFX_DIBBase::GetBPP(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), CFX_DIBBase::HasPalette(), CFX_DIBBase::IsAlphaFormat(), FX_RECT::IsEmpty(), CFX_DIBBase::IsMaskFormat(), kBgra, FX_RECT::left, FX_RECT::right, FX_RECT::top, and FX_RECT::Width().
| bool CFX_DIBitmap::ConvertColorScale | ( | uint32_t | forecolor, |
| uint32_t | backcolor ) |
Definition at line 511 of file cfx_dibitmap.cpp.
| bool CFX_DIBitmap::ConvertFormat | ( | FXDIB_Format | format | ) |
Definition at line 875 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetFormat(), CFX_DIBBase::HasPalette(), k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, CFX_DIBBase::SetFormat(), CFX_DIBBase::SetPitch(), and SetUniformOpaqueAlpha().
Referenced by MultiplyAlpha(), and MultiplyAlphaMask().
| bool CFX_DIBitmap::Copy | ( | RetainPtr< const CFX_DIBBase > | source | ) |
Definition at line 85 of file cfx_dibitmap.cpp.
|
nodiscard |
Definition at line 44 of file cfx_dibitmap.cpp.
References Create().
|
nodiscard |
Definition at line 48 of file cfx_dibitmap.cpp.
References CFX_DIBBase::SetFormat(), CFX_DIBBase::SetHeight(), CFX_DIBBase::SetPitch(), and CFX_DIBBase::SetWidth().
Referenced by Create().
| pdfium::span< const uint8_t > CFX_DIBitmap::GetBuffer | ( | ) | const |
Definition at line 103 of file cfx_dibitmap.cpp.
|
overridevirtual |
Reimplemented from CFX_DIBBase.
Definition at line 119 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetHeight(), and CFX_DIBBase::GetPitch().
|
overridevirtual |
Implements CFX_DIBBase.
Definition at line 111 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetPitch().
|
inline |
Definition at line 66 of file cfx_dibitmap.h.
|
inline |
Definition at line 74 of file cfx_dibitmap.h.
|
inline |
Definition at line 84 of file cfx_dibitmap.h.
| bool CFX_DIBitmap::MultiplyAlpha | ( | float | alpha | ) |
Definition at line 380 of file cfx_dibitmap.cpp.
References ConvertFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), CFX_DIBBase::IsMaskFormat(), and kBgra.
| bool CFX_DIBitmap::MultiplyAlphaMask | ( | RetainPtr< const CFX_DIBitmap > | mask | ) |
Definition at line 342 of file cfx_dibitmap.cpp.
References ConvertFormat(), CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), k8bppMask, kBgra, and kBgrx.
| void CFX_DIBitmap::SetRedFromAlpha | ( | ) |
Definition at line 316 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), and kBgra.
| void CFX_DIBitmap::SetUniformOpaqueAlpha | ( | ) |
Definition at line 329 of file cfx_dibitmap.cpp.
References CFX_DIBBase::GetFormat(), CFX_DIBBase::GetHeight(), CFX_DIBBase::GetWidth(), and kBgra.
Referenced by ConvertFormat().
| void CFX_DIBitmap::TakeOver | ( | RetainPtr< CFX_DIBitmap > && | pSrcBitmap | ) |
Definition at line 138 of file cfx_dibitmap.cpp.
| bool CFX_DIBitmap::TransferBitmap | ( | int | width, |
| int | height, | ||
| RetainPtr< const CFX_DIBBase > | source, | ||
| int | src_left, | ||
| int | src_top ) |
Definition at line 206 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 47 of file cfx_dibitmap.h.