QwtColorMap(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸŽ€ NAME πŸŽ€

QwtColorMap β€” and that is genuinely the whole line, bestie. It's just QwtColorMap - with absolutely nothing after the dash. The description left us on read πŸ’€ but don't stress, everything you need is right below.


✨ SYNOPSIS ✨

#include <qwt_color_map.h>

Inherited by QwtAlphaColorMap, and QwtLinearColorMap.

🌸 Public Types 🌸

enum Format { RGB, Indexed }

🌸 Public Member Functions 🌸

QwtColorMap (Format=QwtColorMap::RGB)
virtual ~QwtColorMap ()
QColor color (const QwtDoubleInterval &, double value) const
virtual unsigned char colorIndex (const QwtDoubleInterval &interval,
    double value) const =0
virtual QVector< QRgb > colorTable (const QwtDoubleInterval &) const
virtual QwtColorMap * copy () const =0
Format format () const
virtual QRgb rgb (const QwtDoubleInterval &interval, double value) const
    =0

πŸ’… Detailed Description πŸ’…

QwtColorMap is the girl whose entire job is mapping values into colors. That's it, that's the gig. πŸ‘‘

So when you're displaying 3D data on a 2D plane, that third dimension is often displayed using colors β€” like, f.e in a spectrogram. The depth is giving hue, periodt.

Each color map is optimized to return colors for only one of the following image formats, so pick your lane:

  • QImage::Format_Indexed8
  • QImage::Format_ARGB32

See also: QwtPlotSpectrogram, QwtScaleWidget


πŸ” Member Enumeration Documentation πŸ”

enum QwtColorMap::Format

  • 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()


🧠 Member Function Documentation 🧠

QColor QwtColorMap::color (const QwtDoubleInterval &interval, doublevalue) const [inline]

🫢 quick heads up: the page really does print that parameter glued together as doublevalue, no space. Not me editing it, I'm just the messenger πŸ™ˆ

Maps a value into a color. Cute, simple, iconic.

Parameters:

  • interval β€” valid interval for values
  • value β€” value

Returns: the color corresponding to value

⚠️ Warning: this method is slow for Indexed color maps. If it is necessary to map many values, it's better to get the color table once and then find the color using colorIndex(). No cap β€” do the lookup once, don't do it in a loop, bestie 😭

virtual unsigned char QwtColorMap::colorIndex (const QwtDoubleInterval &interval, doublevalue) const [pure virtual]

Maps a value of a given interval into a color index.

Parameters:

  • interval β€” range for the values
  • value β€” value

Returns: the color index corresponding to value

Implemented in QwtLinearColorMap.


QwtColorTable QwtColorMap::colorTable (const QwtDoubleInterval &interval) const [virtual]

Builds and returns 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

πŸ‘€ and yes, the synopsis up top says this returns QVector< QRgb > while this line says QwtColorTable. That's literally what the page says. I'm not touching it, I'm just reporting the tea πŸ’€

QwtColorMap::Format QwtColorMap::format () const [inline]

Returns: the intended format of the color map

See also: Format


virtual QRgb QwtColorMap::rgb (const QwtDoubleInterval &interval, doublevalue) const [pure virtual]

Maps a value of a given interval into a rgb value. 🌈

Parameters:

  • interval β€” range for the values
  • value β€” value

Returns: the rgb value corresponding to value

Implemented in QwtAlphaColorMap, and QwtLinearColorMap.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. Like, it wrote itself. Main character energy fr fr ✨


okay that's the whole page, bestie, you ate that πŸ’… this was QwtColorMap(3) from the Qwt User's Guide, Version 5.2.3, dated Tue Nov 20 2012. Obsessed with her, honestly. go map some values, you've got this πŸ¦‹πŸ’–

πŸ“¦ where this page comes from