A palette is a table that maps pixel values to RGB colours. It allows the colours
of a low-depth bitmap, for example, to be mapped to the available colours in a display.
Objects:
NullPalette
Copy constructor. This uses reference counting so is a cheap operation.
Palette.new(%(arg-type)Integer% n, Integer red, Integer green, Integer blue)Creates a palette from arrays of size n, one for each
red, blue or green component.
Destructor.
Creates a palette from arrays of size n, one for each
red, blue or green component.
true if the creation was successful, false otherwise.
Returns number of entries in palette.
Returns a pixel value (index into the palette) for the given RGB values.
The nearest palette index.
Returns RGB values for a given palette index.
true if the operation was successful.
Returns true if palette data is present.
Assignment operator, using reference counting. Returns a reference
to `this’.
Equality operator. Two palettes are equal if they contain pointers
to the same underlying palette data. It does not compare each attribute,
so two independently-created palettes using the same parameters will
fail the test.
Inequality operator. Two palettes are not equal if they contain pointers
to different underlying palette data. It does not compare each attribute.
[This page automatically generated from the Textile source at 2023-06-13 21:31:33 +0000]