QwtColorMap(3)
π QwtColorMap(3) β mapping values into colors, no cap β¨
okay so this page is straight outta the Library Functions Manual, and itβs all about QwtColorMap, bestie. π
πΈ NAME πΈ
QwtColorMap is used to map values into colors. periodt.
β¨ SYNOPSIS β¨
#include <qwt_color_map.h>
Inherited by QwtAlphaColorMap, QwtHueColorMap, QwtLinearColorMap, and QwtSaturationValueColorMap. the family tree ate π
π Public Types
enum Format { RGB, Indexed }
π¦ Public Member Functions
QwtColorMap (Format=QwtColorMap::RGB)virtual ~QwtColorMap ()β Destructor.void setFormat (Format)virtual QRgb rgb (const QwtInterval &interval, double value) const =0virtual 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) constvirtual QVector< QRgb > colorTable (int numColors) constvirtual QVector< QRgb > colorTable256 () const
π Public Attributes
Format const
π Detailed Description
QwtColorMap is used to map values into colors. literally its whole main character job π
For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram. thatβs the vibe π¨
Each color map is optimized to return colors for only one of the following image formats:
QImage::Format_Indexed8QImage::Format_ARGB32
See also: QwtPlotSpectrogram, QwtScaleWidget.
Definition at line 37 of file qwt_color_map.h.
π§ Member Enumeration Documentation
enum QwtColorMap::Format
Format for color mapping. iconic little enum tbh.
See also: rgb(), colorIndex(), colorTable().
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. slay, efficient queen π
See also: colorIndex(), colorTable().
Definition at line 45 of file qwt_color_map.h.
π Constructor & Destructor Documentation
QwtColorMap::QwtColorMap (Format format = QwtColorMap::RGB) [explicit]
Constructor. the birth of a color-mapping icon β¨
Parameters
formatβ Format of the color map
Definition at line 249 of file qwt_color_map.cpp.
QwtColorMap::~QwtColorMap () [virtual]
Destructor. bye bestie π«Ά
Definition at line 255 of file qwt_color_map.cpp.
π Member Function Documentation
QColor QwtColorMap::color (const QwtInterval & interval, double value) const [inline]
Map a value into a color. cute and direct.
Parameters
intervalβ Valid interval for valuesvalueβ Value
Returns
Color corresponding to value.
Definition at line 248 of file qwt_color_map.h.
uint QwtColorMap::colorIndex (int numColors, const QwtInterval & interval, double value) const [virtual]
Map a value of a given interval into a color index. lowkey the index-maker π
Parameters
numColorsβ Number of colorsintervalβ Range for all valuesvalueβ Value to map into a color index
Returns
Index, between 0 and numColors - 1, or -1 for an invalid value.
Reimplemented in QwtLinearColorMap.
Definition at line 278 of file qwt_color_map.cpp.
QVector< QRgb > QwtColorMap::colorTable (int numColors) const [virtual]
Build and return a color map of arbitrary number of colors. custom palette energy β¨
The color table is needed for rendering indexed images in combination with using colorIndex().
Parameters
numColorsβ Number of colors
Returns
A color table.
Definition at line 325 of file qwt_color_map.cpp.
QVector< QRgb > QwtColorMap::colorTable256 () const [virtual]
Build and return a color map of 256 colors. 256 is such a moment π₯
The color table is needed for rendering indexed images in combination with using colorIndex().
Returns
A color table, that can be used for a QImage.
Definition at line 304 of file qwt_color_map.cpp.
virtual QRgb QwtColorMap::rgb (const QwtInterval & interval, double value) const [pure virtual]
Map a value of a given interval into a RGB value. pure virtual, pure vibes π
Parameters
intervalβ Range for the valuesvalueβ Value
Returns
RGB value, corresponding to value.
Implemented in QwtAlphaColorMap, QwtHueColorMap, QwtLinearColorMap, and QwtSaturationValueColorMap.
void QwtColorMap::setFormat (Format format)
Set the format of the color map. switch it up, bestie π
Parameters
formatβ Format of the color map
Definition at line 264 of file qwt_color_map.cpp.
π Member Data Documentation
QwtColorMap::Format QwtColorMap::const [inline]
Initial value:
{
return m_format
Returns
Intended format of the color map.
See also: Format.
Definition at line 67 of file qwt_color_map.h.
π Author
Generated automatically by Doxygen for Qwt User's Guide from the source code. no cap, the docs wrote themselves π
π signed with the cutest footer energy: source/version = Qwt User's Guide, page = QwtColorMap(3) β and the original footer has no date printed on it, so thatβs all the date tea we have π«Ά
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms