20#include <config_features.h>
23#include <osl/diagnose.h>
70 : mpImpl(GetGlobalDefault())
75 : mpImpl(rOther.mpImpl)
80 : mpImpl(std::move(rOther.mpImpl))
85 : mpImpl(aBitmapColor)
109 mpImpl = std::move(rOther.mpImpl);
115 return mpImpl->GetBitmapData().data();
122 auto const& rBitmapData =
mpImpl->GetBitmapData();
139 assert(nIndex < mpImpl->GetBitmapData().
size() &&
"Palette index is out of range");
145 assert(nIndex < mpImpl->GetBitmapData().
size() &&
"Palette index is out of range");
151 auto const& rBitmapColor =
mpImpl->GetBitmapData();
152 sal_uInt16 nRetIndex = 0;
154 if (!rBitmapColor.empty())
156 for (
size_t j = 0; j < rBitmapColor.size(); ++j)
158 if (rCol == rBitmapColor[j])
165 for (
size_t i = 0;
i < rBitmapColor.size(); ++
i)
168 if (nActErr < nLastErr)
181 auto const& rBitmapColor =
mpImpl->GetBitmapData();
186 if (nEntryCount == 2 || nEntryCount == 4 || nEntryCount == 16 || nEntryCount == 256)
189 if (rGreyPalette == *
this)
195 if (nEntryCount == 2)
207 auto const& rBitmapColor =
mpImpl->GetBitmapData();
211 if (nEntryCount != 256)
213 for (sal_uInt16
i = 0;
i < 256; ++
i)
sal_uInt64 BitmapChecksum
BitmapChecksum vcl_get_checksum(BitmapChecksum Checksum, const void *Data, sal_uInt32 DatLen)
BitmapChecksum GetChecksum() const
sal_uInt16 GetEntryCount() const
bool IsGreyPaletteAny() const
Returns true if the palette is a grey palette (may not be 8-bit).
void SetEntryCount(sal_uInt16 nCount)
bool operator==(const BitmapPalette &rBitmapPalette) const
bool IsGreyPalette8Bit() const
Returns true if the palette is 8-bit grey palette.
const BitmapColor & operator[](sal_uInt16 nIndex) const
sal_uInt16 GetBestIndex(const BitmapColor &rCol) const
SAL_DLLPRIVATE const BitmapColor * ImplGetColorBuffer() const
BitmapPalette & operator=(const BitmapPalette &)
static const BitmapPalette & GetGreyPalette(int nEntries)
sal_uInt8 GetBlue() const
sal_uInt16 GetColorError(const Color &rCompareColor) const
sal_uInt8 GetGreen() const
const std::vector< BitmapColor > & GetBitmapData() const
std::vector< BitmapColor > & GetBitmapData()
bool operator==(const ImplBitmapPalette &rBitmapPalette) const
ImplBitmapPalette(sal_uInt16 nCount)
ImplBitmapPalette(const BitmapColor *first, const BitmapColor *last)
ImplBitmapPalette(std::initializer_list< BitmapColor > aBitmapColor)
std::vector< BitmapColor > maBitmapColor
constexpr OUStringLiteral first
constexpr OUStringLiteral last