39 static void *
operator new(
size_t nSize) {
52 static void operator delete(
void *pBlock) {
102 void SetEntries(
const unsigned int *pEntries,
int nFirst,
int nCount);
135 int FindClosest(
unsigned int nColor,
int nFirst,
int nLast)
const;
constexpr int kAPaletteEntryCount
Entries a palette stores, one for every value an eight bit index can take.
Definition apalette.h:11
constexpr int kAPaletteInverseEntryCount
Entries in the inverse lookup table, one for every 1555 colour with the alpha bit cleared.
Definition apalette.h:14
void SetEntriesRGB(const unsigned char *pRGB, int nFirst, int nCount)
Copy a run of three byte red, green, blue entries into the table with full alpha.
static void BuildRampPalette(const std::vector< NormalKey > &keys, APalette &palette)
Fill the table with a ramp of sixteen shades for every key, from black towards the key's colour.
APalette()
Construct a palette with no entries written.
Definition apalette.h:62
int FindClosest(unsigned int nColor, int nFirst, int nLast) const
Search an inclusive index range for the entry nearest a colour.
unsigned int mEntries[kAPaletteEntryCount]
Definition apalette.h:156
APalette(const unsigned int *pEntries, int nCount)
Construct a palette from a table of entries.
Definition apalette.h:75
void SetEntries(const unsigned int *pEntries, int nFirst, int nCount)
Copy a run of entries into the table.
int mEnd
Definition apalette.h:169
~APalette()
Release the inverse lookup table.
Definition apalette.h:86
unsigned char * mpRgb15ToIndex
Table of one palette index per 1555 colour, null until a caller supplies one.
Definition apalette.h:168
Colour recorded as its brightest channel and the three channels divided by it.
Definition normalkey.h:17
void OperatorDeleteOverride(void *pBlock, const char *pszClass)
Release a block that AllocateTaggedMemory() handed out.
void * AllocateTaggedMemory(size_t nSize, const char *pszClass)
Allocate a block for one object of a named class.