|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
QwtColorMap is used to map values into colors. More...
#include <qwt_color_map.h>
Public Types | |
| enum | Format { RGB , Indexed } |
| Format for color mapping. More... | |
Public Member Functions | |
| QwtColorMap (Format=QwtColorMap::RGB) | |
| Constructor. | |
| virtual | ~QwtColorMap () |
| Destructor. | |
| void | setFormat (Format) |
| Set the format of the color map. | |
| Format | format () const |
| virtual QRgb | rgb (const QwtInterval &interval, double value) const =0 |
| Map a value of a given interval into a RGB value. | |
| virtual uint | colorIndex (int numColors, const QwtInterval &interval, double value) const |
| Map a value of a given interval into a color index. | |
| QColor | color (const QwtInterval &, double value) const |
| virtual QVector< QRgb > | colorTable (int numColors) const |
| Build and return a color map of arbitrary number of colors. | |
| virtual QVector< QRgb > | colorTable256 () const |
| Build and return a color map of 256 colors. | |
QwtColorMap is used to map values into colors.
| enum QwtColorMap::Format |
Format for color mapping.
| Enumerator | |
|---|---|
| RGB | The map is intended to map into RGB values. |
| Indexed | Map values into 8 bit values, that are used as indexes into the color table. Indexed color maps are used to generate QImage::Format_Indexed8 images. The calculation of the color index is usually faster and the resulting image has a lower memory footprint.
|
|
explicit |
Constructor.
|
virtual |
Map a value of a given interval into a color index.
Reimplemented in QwtLinearColorMap.
|
virtual |
Build and return a color map of arbitrary number of colors.
|
virtual |
Build and return a color map of 256 colors.
|
pure virtual |
Map a value of a given interval into a RGB value.
Implemented in QwtLinearColorMap, QwtAlphaColorMap, QwtHueColorMap, and QwtSaturationValueColorMap.
| void QwtColorMap::setFormat | ( | Format | format | ) |
Set the format of the color map.