QWT 7.0.1
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
QwtHueColorMap Class Reference

QwtHueColorMap varies the hue value of the HSV color model. More...

#include <qwt_color_map.h>

Inheritance diagram for QwtHueColorMap:
QwtColorMap

Classes

class  PrivateData
 

Public Member Functions

 QwtHueColorMap (QwtColorMap::Format=QwtColorMap::RGB)
 Constructor.
 
virtual ~QwtHueColorMap ()
 Destructor.
 
void setHueInterval (int hue1, int hue2)
 Set the interval for the hue coordinate.
 
void setSaturation (int saturation)
 Set the the saturation coordinate.
 
void setValue (int value)
 Set the the value coordinate.
 
void setAlpha (int alpha)
 Set the the alpha coordinate.
 
int hue1 () const
 
int hue2 () const
 
int saturation () const
 
int value () const
 
int alpha () const
 
virtual QRgb rgb (const QwtInterval &, double value) const QWT_OVERRIDE
 Map a value of a given interval into a RGB value.
 
- Public Member Functions inherited from QwtColorMap
 QwtColorMap (Format=QwtColorMap::RGB)
 Constructor.
 
virtual ~QwtColorMap ()
 Destructor.
 
void setFormat (Format)
 Set the format of the color map.
 
Format format () const
 
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
 Map a value into a color.
 
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.
 

Additional Inherited Members

- Public Types inherited from QwtColorMap
enum  Format { RGB , Indexed }
 Format for color mapping. More...
 

Detailed Description

QwtHueColorMap varies the hue value of the HSV color model.

QwtHueColorMap can be used to set up a color map easily, that runs cyclic over all colors. Each cycle has 360 different steps.

The values for value and saturation are in the range of 0 to 255 and doesn't depend on the data value to be mapped.

See also
QwtSaturationValueColorMap

Constructor & Destructor Documentation

◆ QwtHueColorMap()

QwtHueColorMap::QwtHueColorMap ( QwtColorMap::Format  format = QwtColorMap::RGB)
explicit

Constructor.

The hue interval is initialized by 0 to 359. All other coordinates are set to 255.

Parameters
formatFormat of the color map
See also
setHueInterval(), setSaturation(), setValue(), setValue()

Member Function Documentation

◆ alpha()

int QwtHueColorMap::alpha ( ) const
Returns
Alpha coordinate
See also
setAlpha()

◆ hue1()

int QwtHueColorMap::hue1 ( ) const
Returns
First hue coordinate
See also
setHueInterval()

◆ hue2()

int QwtHueColorMap::hue2 ( ) const
Returns
Second hue coordinate
See also
setHueInterval()

◆ rgb()

QRgb QwtHueColorMap::rgb ( const QwtInterval interval,
double  value 
) const
virtual

Map a value of a given interval into a RGB value.

Parameters
intervalRange for all values
valueValue to map into a RGB value
Returns
RGB value for value

Implements QwtColorMap.

◆ saturation()

int QwtHueColorMap::saturation ( ) const
Returns
Saturation coordinate
See also
setSaturation()

◆ setAlpha()

void QwtHueColorMap::setAlpha ( int  alpha)

Set the the alpha coordinate.

alpha needs to be in the range 0 to 255, where 255 means opaque and 0 means transparent.

Parameters
alphaAlpha coordinate
See also
alpha()

◆ setHueInterval()

void QwtHueColorMap::setHueInterval ( int  hue1,
int  hue2 
)

Set the interval for the hue coordinate.

hue1/hue2 need to be positive number and can be > 360 to define cycles. F.e. 420 to 240 defines a map yellow/red/magenta/blue.

Parameters
hue1First hue coordinate
hue2Second hue coordinate
See also
hue1(), hue2()

◆ setSaturation()

void QwtHueColorMap::setSaturation ( int  saturation)

Set the the saturation coordinate.

saturation needs to be in the range 0 to 255,

Parameters
saturationSaturation coordinate
See also
saturation()

◆ setValue()

void QwtHueColorMap::setValue ( int  value)

Set the the value coordinate.

value needs to be in the range 0 to 255,

Parameters
valueValue coordinate
See also
value()

◆ value()

int QwtHueColorMap::value ( ) const
Returns
Value coordinate
See also
setValue()

The documentation for this class was generated from the following files: