|
Qwt User's Guide
6.1.3
|
QwtColorMap is used to map values into colors. More...
#include <qwt_color_map.h>

Public Types | |
| enum | Format { RGB, Indexed } |
Public Member Functions | |
| QwtColorMap (Format=QwtColorMap::RGB) | |
| Constructor. | |
| virtual | ~QwtColorMap () |
| Destructor. | |
| Format | format () const |
| virtual QRgb | rgb (const QwtInterval &interval, double value) const =0 |
| virtual unsigned char | colorIndex (const QwtInterval &interval, double value) const =0 |
| QColor | color (const QwtInterval &, double value) const |
| virtual QVector< QRgb > | colorTable (const QwtInterval &) const |
QwtColorMap is used to map values into colors.
For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram.
Each color map is optimized to return colors for only one of the following image formats:
| enum QwtColorMap::Format |
Format for color mapping
| Enumerator | |
|---|---|
| RGB |
The map is intended to map into RGB values. |
| Indexed |
The map is intended to map into 8 bit values, that are indices into the color table. |
|
inline |
Map a value into a color
| interval | Valid interval for values |
| value | Value |
|
pure virtual |
Map a value of a given interval into a color index
| interval | Range for the values |
| value | Value |
Implemented in QwtLinearColorMap.
|
virtual |
Build and return a color map of 256 colors
The color table is needed for rendering indexed images in combination with using colorIndex().
| interval | Range for the values |
|
inline |
|
pure virtual |
Map a value of a given interval into a RGB value.
| interval | Range for the values |
| value | Value |
Implemented in QwtAlphaColorMap, and QwtLinearColorMap.