QwtAlphaColorMap variies the alpha value of a color.
More...
#include <qwt_color_map.h>
List of all members.
Detailed Description
QwtAlphaColorMap variies the alpha value of a color.
Member Enumeration Documentation
- RGB
The map is intended to map into QRgb values.
- Indexed
The map is intended to map into 8 bit values, that are indices into the color table.
- See also:
- rgb(), colorIndex(), colorTable()
Constructor & Destructor Documentation
QwtAlphaColorMap::QwtAlphaColorMap |
( |
const QColor & |
color = QColor(Qt::gray) | ) |
|
Copy constructor
- Parameters:
-
QwtAlphaColorMap::~QwtAlphaColorMap |
( |
| ) |
[virtual] |
Member Function Documentation
QColor QwtAlphaColorMap::color |
( |
| ) |
const |
QColor QwtColorMap::color |
( |
const QwtDoubleInterval & |
interval, |
|
|
double |
value |
|
) |
| const [inline, inherited] |
Map a value into a color
- Parameters:
-
interval | Valid interval for values |
value | Value |
- Returns:
- Color corresponding to value
- Warning:
- This method is slow for Indexed color maps. If it is necessary to map many values, its better to get the color table once and find the color using colorIndex().
QwtColorTable QwtColorMap::colorTable |
( |
const QwtDoubleInterval & |
interval | ) |
const [virtual, inherited] |
Build and return a color map of 256 colors
The color table is needed for rendering indexed images in combination with using colorIndex().
- Parameters:
-
interval | Range for the values |
- Returns:
- A color table, that can be used for a QImage
QwtColorMap * QwtAlphaColorMap::copy |
( |
| ) |
const [virtual] |
- Returns:
- Intended format of the color map
- See also:
- Format
Assignment operator
- Parameters:
-
- Returns:
- *this
QRgb QwtAlphaColorMap::rgb |
( |
const QwtDoubleInterval & |
interval, |
|
|
double |
value |
|
) |
| const [virtual] |
Map a value of a given interval into a alpha value.
alpha := (value - interval.minValue()) / interval.width();
- Parameters:
-
interval | Range for all values |
value | Value to map into a rgb value |
- Returns:
- rgb value, with an alpha value
Implements QwtColorMap.
void QwtAlphaColorMap::setColor |
( |
const QColor & |
color | ) |
|
Set the color
- Parameters:
-
- See also:
- color()