#include <Palette.h>
Public Methods | |
| Palette (int ncolours) | |
| Constructor. | |
| ~Palette (void) | |
| Destructor. | |
| int | inq_ncolours (void) const |
| rgbcolour_t * | inq_colours (void) const |
| float * | inq_linear_colours (void) const |
| void | resize (int) |
| Resizes this Palette to contain the given number of colours. | |
| void | randomise (void) |
| Randomly sets the colours in the palette, except the last colour which is set to black. | |
| palette_t | inq_type (void) const |
| void | set_type (palette_t type) |
| rgbcolour_t | inq_main_colour (void) const |
| void | set_main_colour (rgbcolour_t col) |
| Sets the last colour in the palette, which is used for pixels that have reached the maximum number of iterations without diverging. | |
| double | gamma_correct (double linear_col) const |
Private Methods | |
| void | init (int ncolours) |
| Initialises this Palette to the given size. | |
| void | randomise_bright (void) |
| Fills the palette with randomly selected bright colours. | |
| void | randomise_pastel (void) |
| Fills the palette with randomly selected pastel colours. | |
| void | randomise_monochrome (void) |
| Fills the palette with randomly selected shades of gray. | |
| void | set_white (void) |
| Sets the palette to all white, except the last entry which is set to the main colour. | |
| void | update_linear_colours (void) |
| This is called whenever the colours in the palette are changed. | |
Private Attributes | |
| palette_t | m_type |
| Palette type. | |
| rgbcolour_t | m_main_colour |
| Specifies the last colour in the palette, which is used for pixels that have reached the maximum number of iterations without diverging. | |
| int | m_ncolours |
| Number of colours in the palette. | |
| rgbcolour_t * | m_colours |
| The colours in the palette. | |
| float * | m_linear_colours |
| The colours in the palette, transformed into a linear colour space for anti-aliasing. | |
|
|
Constructor.
|
|
|
Destructor.
|
|
|
|
|
|
Initialises this Palette to the given size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Randomly sets the colours in the palette, except the last colour which is set to black.
|
|
|
Fills the palette with randomly selected bright colours.
|
|
|
Fills the palette with randomly selected shades of gray.
|
|
|
Fills the palette with randomly selected pastel colours.
|
|
|
Resizes this Palette to contain the given number of colours.
|
|
|
Sets the last colour in the palette, which is used for pixels that have reached the maximum number of iterations without diverging.
|
|
|
|
|
|
Sets the palette to all white, except the last entry which is set to the main colour.
|
|
|
This is called whenever the colours in the palette are changed.
|
|
|
The colours in the palette. The last colour in the palette will be 'm_main_colour'. The size of this array is 'm_ncolours'. |
|
|
The colours in the palette, transformed into a linear colour space for anti-aliasing. Each colour is stored as 3 floats, in the order red, green, blue. Each colour component is in the range [0,1] The size of this array is therefore 3 x 'm_ncolours' |
|
|
Specifies the last colour in the palette, which is used for pixels that have reached the maximum number of iterations without diverging.
|
|
|
Number of colours in the palette.
|
|
|
Palette type. This determines the types of colours that are randomly generated. |
1.2.16