◆ PaletteLookup()
| Graphics::PaletteLookup::PaletteLookup |
( |
const byte * |
palette, |
|
|
uint |
len |
|
) |
| |
Construct a new Palette Lookup object.
- Parameters
-
| palette | the palette data, in interleaved RGB format |
| len | the number of palette entries to be read |
◆ setPalette()
| bool Graphics::PaletteLookup::setPalette |
( |
const byte * |
palette, |
|
|
uint |
len |
|
) |
| |
Pass palette to the look up. It also compares given palette with the current one and resets cache only when their contents is different.
- Parameters
-
| palette | the palette data, in interleaved RGB format |
| len | the number of palette entries to be read |
- Returns
- true if palette was changed and false if it was the same
◆ findBestColor()
This method returns closest color from the palette and it uses cache for faster lookups.
- Parameters
-
| method | the method used to determine the closest color |
- Returns
- the palette index
◆ createMap()
This method creates a map from the given palette that can be used by crossBlitMap().
- Parameters
-
| palette | the palette data, in interleaved RGB format |
| len | the number of palette entries to be read |
| method | the method used to determine the closest color |
- Returns
- the created map, or nullptr if one isn't needed.
The documentation for this class was generated from the following file: