1
.TH "QwtColorMap" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherited by \fBQwtAlphaColorMap\fP, and \fBQwtLinearColorMap\fP.
11
.SH "Detailed Description"
13
\fBQwtColorMap\fP is used to map values into colors.
15
For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram.
17
Each color map is optimized to return colors for only one of the following image formats:
20
QImage::Format_Indexed8
31
\fBQwtPlotSpectrogram\fP, \fBQwtScaleWidget\fP
36
Definition at line 44 of file qwt_color_map.h.
41
.RI "enum \fBFormat\fP { \fBRGB\fP, \fBIndexed\fP }"
44
.SS "Public Member Functions"
48
.RI "\fBQwtColorMap\fP (\fBFormat\fP=QwtColorMap::RGB)"
51
.RI "virtual \fB~QwtColorMap\fP ()"
54
.RI "\fBFormat\fP \fBformat\fP () const"
57
.RI "virtual \fBQwtColorMap\fP * \fBcopy\fP () const=0"
60
.RI "virtual QRgb \fBrgb\fP (const \fBQwtDoubleInterval\fP &interval, double value) const=0"
63
.RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtDoubleInterval\fP &interval, double value) const=0"
66
.RI "QColor \fBcolor\fP (const \fBQwtDoubleInterval\fP &, double value) const"
69
.RI "virtual QVector< QRgb > \fBcolorTable\fP (const \fBQwtDoubleInterval\fP &) const"
72
.SH "Member Enumeration Documentation"
74
.SS "enum \fBQwtColorMap::Format\fP"
79
The map is intended to map into QRgb values.
83
The map is intended to map into 8 bit values, that are indices into the color table.
88
\fBrgb()\fP, \fBcolorIndex()\fP, \fBcolorTable()\fP
93
Definition at line 57 of file qwt_color_map.h.
94
.SH "Constructor & Destructor Documentation"
96
.SS "QwtColorMap::QwtColorMap (\fBFormat\fP = \fCQwtColorMap::RGB\fP)"
100
Definition at line 164 of file qwt_color_map.cpp.
101
.SS "QwtColorMap::~QwtColorMap ()\fC [virtual]\fP"
105
Definition at line 170 of file qwt_color_map.cpp.
106
.SH "Member Function Documentation"
108
.SS "\fBQwtColorMap::Format\fP QwtColorMap::format () const\fC [inline]\fP"
112
Intended format of the color map
122
Definition at line 216 of file qwt_color_map.h.
124
Referenced by QwtPainter::drawColorBar().
125
.SS "virtual \fBQwtColorMap\fP* QwtColorMap::copy () const\fC [pure virtual]\fP"
129
Implemented in \fBQwtLinearColorMap\fP, and \fBQwtAlphaColorMap\fP.
131
Referenced by QwtScaleWidget::setColorMap(), and QwtPlotSpectrogram::setColorMap().
132
.SS "virtual QRgb QwtColorMap::rgb (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [pure virtual]\fP"
134
Map a value of a given interval into a rgb value.
138
\fIinterval\fP Range for the values
145
rgb value, corresponding to value
150
Implemented in \fBQwtLinearColorMap\fP, and \fBQwtAlphaColorMap\fP.
152
Referenced by color(), colorTable(), and QwtPainter::drawColorBar().
153
.SS "virtual unsigned char QwtColorMap::colorIndex (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [pure virtual]\fP"
155
Map a value of a given interval into a color index
159
\fIinterval\fP Range for the values
166
color index, corresponding to value
171
Implemented in \fBQwtLinearColorMap\fP.
173
Referenced by color(), and QwtPainter::drawColorBar().
174
.SS "QColor QwtColorMap::color (const \fBQwtDoubleInterval\fP & interval, double value) const\fC [inline]\fP"
176
Map a value into a color
180
\fIinterval\fP Valid interval for values
187
Color corresponding to value
192
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 \fBcolorIndex()\fP.
197
Definition at line 198 of file qwt_color_map.h.
199
References colorIndex(), colorTable(), and rgb().
200
.SS "QwtColorTable QwtColorMap::colorTable (const \fBQwtDoubleInterval\fP & interval) const\fC [virtual]\fP"
202
Build and return a color map of 256 colors
204
The color table is needed for rendering indexed images in combination with using \fBcolorIndex()\fP.
208
\fIinterval\fP Range for the values
213
A color table, that can be used for a QImage
218
Definition at line 183 of file qwt_color_map.cpp.
220
References QwtDoubleInterval::isValid(), QwtDoubleInterval::minValue(), rgb(), and QwtDoubleInterval::width().
222
Referenced by color(), and QwtPainter::drawColorBar().
226
Generated automatically by Doxygen for Qwt User's Guide from the source code.