Palette with array of colors.
More...
#include <palette.h>
|
| Palette () |
| Create an empty palette.
|
|
| Palette (const AnalyticPalette &, int=16) |
| Create a palette from an analytic palette. More...
|
|
| Palette (const QVector< QColor > &) |
| Create a palette. More...
|
|
| Palette (const QVector< Color > &) |
| Create a palette. More...
|
|
| Palette (const QVector< Color > &, const QVector< double > &) |
| Create a palette. More...
|
|
| Palette (const Color &, const Color &, const Color &, const double &=0.5) |
| Create a diverging palette. More...
|
|
| Palette (const QImage &) |
| Create a palette from an image. More...
|
|
void | ScaleTo (const double &=0.0, const double &=1.0) |
| Scale the range of values of the palette so that it lies in the prescribed interval. More...
|
|
Color | GetColor (const double &) const |
| Compute a color in the palette. More...
|
|
void | Saturate (const double &) |
| Saturate all colors of the palette. More...
|
|
void | Brighten (const double &) |
| Brighten all colors of the palette. More...
|
|
virtual QImage | Draw (int=32, int=1024) const |
| Draws an image with the colors of the palette. More...
|
|
virtual QImage | CreateImage (int, int=16, bool=false) const |
| Create an image form a palette. More...
|
|
|
static Palette | ShadedRelief () |
| Generate a shader relief palette.
|
|
static Palette | BrownDesert () |
| Brown desert palette.
|
|
|
QVector< Color > | c |
| Array of colors.
|
|
QVector< double > | a |
| Anchors.
|
|
int | type = 0 |
| Type, used to speed-up queries.
|
|
Palette with array of colors.
◆ Palette() [1/6]
Create a palette from an analytic palette.
- Parameters
-
p | Analytic palette. |
n | Sampling. |
◆ Palette() [2/6]
Palette::Palette |
( |
const QVector< QColor > & |
qtc | ) |
|
Create a palette.
- Parameters
-
qtc | Set of evenly distributed Qt colors points. |
◆ Palette() [3/6]
Palette::Palette |
( |
const QVector< Color > & |
c | ) |
|
Create a palette.
- Parameters
-
c | Set of evenly distributed colors points. |
◆ Palette() [4/6]
Palette::Palette |
( |
const QVector< Color > & |
c, |
|
|
const QVector< double > & |
a |
|
) |
| |
Create a palette.
- Parameters
-
◆ Palette() [5/6]
Palette::Palette |
( |
const Color & |
ca, |
|
|
const Color & |
cb, |
|
|
const Color & |
cc, |
|
|
const double & |
ab = 0.5 |
|
) |
| |
Create a diverging palette.
- Parameters
-
ca,cb,cc | End colors and diverging color. |
ab | Diverging entry. |
◆ Palette() [6/6]
Palette::Palette |
( |
const QImage & |
image | ) |
|
Create a palette from an image.
- Parameters
-
image | Input palette colors. |
◆ Brighten()
void Palette::Brighten |
( |
const double & |
x | ) |
|
Brighten all colors of the palette.
- Parameters
-
◆ GetColor()
Color Palette::GetColor |
( |
const double & |
t | ) |
const |
|
virtual |
Compute a color in the palette.
- Parameters
-
t | Interpolation parameter. |
Reimplemented from GenericPalette.
◆ Saturate()
void Palette::Saturate |
( |
const double & |
x | ) |
|
Saturate all colors of the palette.
- Parameters
-
◆ ScaleTo()
void Palette::ScaleTo |
( |
const double & |
x = 0.0 , |
|
|
const double & |
y = 1.0 |
|
) |
| |
Scale the range of values of the palette so that it lies in the prescribed interval.
- Parameters
-