LibreOffice Module vcl (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
BitmapPalette Class Reference

#include <BitmapPalette.hxx>

Collaboration diagram for BitmapPalette:
[legend]

Public Types

typedef o3tl::cow_wrapper< ImplBitmapPaletteImplType
 

Public Member Functions

SAL_DLLPRIVATE const BitmapColorImplGetColorBuffer () const
 
SAL_DLLPRIVATE BitmapColorImplGetColorBuffer ()
 
BitmapChecksum GetChecksum () const
 
 BitmapPalette ()
 
 BitmapPalette (const BitmapPalette &)
 
 BitmapPalette (BitmapPalette &&) noexcept
 
 BitmapPalette (std::initializer_list< BitmapColor > aBitmapColor)
 
template<size_t N>
 BitmapPalette (const std::array< BitmapColor, N > &colors)
 
 BitmapPalette (sal_uInt16 nCount)
 
 ~BitmapPalette ()
 
BitmapPaletteoperator= (const BitmapPalette &)
 
BitmapPaletteoperator= (BitmapPalette &&) noexcept
 
bool operator== (const BitmapPalette &rBitmapPalette) const
 
bool operator!= (const BitmapPalette &rBitmapPalette) const
 
bool operator! () const
 
sal_uInt16 GetEntryCount () const
 
void SetEntryCount (sal_uInt16 nCount)
 
const BitmapColoroperator[] (sal_uInt16 nIndex) const
 
BitmapColoroperator[] (sal_uInt16 nIndex)
 
sal_uInt16 GetBestIndex (const BitmapColor &rCol) const
 
bool IsGreyPalette8Bit () const
 Returns true if the palette is 8-bit grey palette. More...
 
bool IsGreyPaletteAny () const
 Returns true if the palette is a grey palette (may not be 8-bit). More...
 

Private Member Functions

 BitmapPalette (const BitmapColor *first, const BitmapColor *last)
 

Private Attributes

ImplType mpImpl
 

Friends

class SalBitmap
 
class BitmapAccess
 

Detailed Description

Definition at line 31 of file BitmapPalette.hxx.

Member Typedef Documentation

◆ ImplType

Definition at line 75 of file BitmapPalette.hxx.

Constructor & Destructor Documentation

◆ BitmapPalette() [1/7]

BitmapPalette::BitmapPalette ( )

Definition at line 69 of file bitmappalette.cxx.

◆ BitmapPalette() [2/7]

BitmapPalette::BitmapPalette ( const BitmapPalette rOther)

Definition at line 74 of file bitmappalette.cxx.

◆ BitmapPalette() [3/7]

BitmapPalette::BitmapPalette ( BitmapPalette &&  rOther)
noexcept

Definition at line 79 of file bitmappalette.cxx.

◆ BitmapPalette() [4/7]

BitmapPalette::BitmapPalette ( std::initializer_list< BitmapColor aBitmapColor)

Definition at line 84 of file bitmappalette.cxx.

◆ BitmapPalette() [5/7]

template<size_t N>
BitmapPalette::BitmapPalette ( const std::array< BitmapColor, N > &  colors)

Definition at line 84 of file BitmapPalette.hxx.

References N.

◆ BitmapPalette() [6/7]

BitmapPalette::BitmapPalette ( sal_uInt16  nCount)
explicit

Definition at line 94 of file bitmappalette.cxx.

References nCount.

◆ ~BitmapPalette()

BitmapPalette::~BitmapPalette ( )

Definition at line 99 of file bitmappalette.cxx.

◆ BitmapPalette() [7/7]

BitmapPalette::BitmapPalette ( const BitmapColor first,
const BitmapColor last 
)
private

Definition at line 89 of file bitmappalette.cxx.

References first, and last.

Member Function Documentation

◆ GetBestIndex()

sal_uInt16 BitmapPalette::GetBestIndex ( const BitmapColor rCol) const

◆ GetChecksum()

BitmapChecksum BitmapPalette::GetChecksum ( ) const

Definition at line 120 of file bitmappalette.cxx.

References mpImpl, and vcl_get_checksum().

Referenced by SalBitmap::updateChecksum().

◆ GetEntryCount()

sal_uInt16 BitmapPalette::GetEntryCount ( ) const

◆ ImplGetColorBuffer() [1/2]

BitmapColor * BitmapPalette::ImplGetColorBuffer ( )

Definition at line 118 of file bitmappalette.cxx.

References mpImpl.

◆ ImplGetColorBuffer() [2/2]

const BitmapColor * BitmapPalette::ImplGetColorBuffer ( ) const

Definition at line 113 of file bitmappalette.cxx.

References mpImpl.

Referenced by ImplPALToPAL(), and ImplPALToTC().

◆ IsGreyPalette8Bit()

bool BitmapPalette::IsGreyPalette8Bit ( ) const

Returns true if the palette is 8-bit grey palette.

Definition at line 205 of file bitmappalette.cxx.

References GetEntryCount(), i, and mpImpl.

Referenced by SalBitmap::convertDataBitCount(), Bitmap::HasGreyPalette8Bit(), ImplFastBitmapBlending(), and ImplFastBitmapConversion().

◆ IsGreyPaletteAny()

bool BitmapPalette::IsGreyPaletteAny ( ) const

Returns true if the palette is a grey palette (may not be 8-bit).

Definition at line 179 of file bitmappalette.cxx.

References Color::GetBlue(), GetEntryCount(), Color::GetGreen(), Bitmap::GetGreyPalette(), Color::GetRed(), and mpImpl.

Referenced by Bitmap::HasGreyPaletteAny().

◆ operator!()

bool BitmapPalette::operator! ( ) const

◆ operator!=()

bool BitmapPalette::operator!= ( const BitmapPalette rBitmapPalette) const
inline

Definition at line 56 of file BitmapPalette.hxx.

◆ operator=() [1/2]

BitmapPalette & BitmapPalette::operator= ( BitmapPalette &&  rOther)
noexcept

Definition at line 107 of file bitmappalette.cxx.

◆ operator=() [2/2]

BitmapPalette & BitmapPalette::operator= ( const BitmapPalette rOther)

Definition at line 101 of file bitmappalette.cxx.

References mpImpl.

◆ operator==()

bool BitmapPalette::operator== ( const BitmapPalette rBitmapPalette) const

Definition at line 126 of file bitmappalette.cxx.

References mpImpl.

◆ operator[]() [1/2]

BitmapColor & BitmapPalette::operator[] ( sal_uInt16  nIndex)

Definition at line 143 of file bitmappalette.cxx.

References mpImpl, nIndex, and size.

◆ operator[]() [2/2]

const BitmapColor & BitmapPalette::operator[] ( sal_uInt16  nIndex) const

Definition at line 137 of file bitmappalette.cxx.

References mpImpl, nIndex, and size.

◆ SetEntryCount()

void BitmapPalette::SetEntryCount ( sal_uInt16  nCount)

Friends And Related Function Documentation

◆ BitmapAccess

friend class BitmapAccess
friend

Definition at line 34 of file BitmapPalette.hxx.

◆ SalBitmap

friend class SalBitmap
friend

Definition at line 33 of file BitmapPalette.hxx.

Member Data Documentation

◆ mpImpl

ImplType BitmapPalette::mpImpl
private

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