![]() |
Fréchet View
1.6.0
A Tool for Exploring Fréchet Distance Algorithms
|
a color map.
Colors are chosen randomly.
Used for the k-Frechet algorithm to color-code components.
#include <palette.h>
Public Member Functions | |
Palette () | |
constructor; creates an empty palette More... | |
QColor | operator[] (size_t key) |
look up a color More... | |
void | clear () |
remove all entries from the map More... | |
Static Public Member Functions | |
static QColor | toColor (int x, int sat=220, int light=200) |
map an integer key to a color More... | |
Private Types | |
typedef QMap< size_t, QColor > | ColorMap |
maps component IDs to random colors More... | |
Private Member Functions | |
QColor | randomColor () |
QColor | nextColor (size_t key) |
get color for a component; chose a new random color, if necessary More... | |
void | stronger (QColor &col) |
make the color a darker saturation More... | |
void | weaker (QColor &col) |
make the color a lighter saturation More... | |
void | addLightness (QColor &col, double diff) |
modify the lightness of a color More... | |
Private Attributes | |
ColorMap | map |
the map More... | |
|
private |
Palette::Palette | ( | ) |
constructor; creates an empty palette
Definition at line 35 of file palette.cpp.
|
inlineprivate |
void Palette::clear | ( | ) |
remove all entries from the map
Definition at line 52 of file palette.cpp.
|
private |
get color for a component; chose a new random color, if necessary
key | component ID |
Definition at line 20 of file palette.cpp.
QColor Palette::operator[] | ( | size_t | key | ) |
look up a color
key | component ID |
Definition at line 38 of file palette.cpp.
|
private |
Definition at line 16 of file palette.cpp.
|
inlineprivate |
|
static |
map an integer key to a color
x | key value |
sat | saturation |
light | lightness |
Definition at line 30 of file palette.cpp.
|
inlineprivate |