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

QwtAlphaColorMap varies the alpha value of a color. More...

#include <qwt_color_map.h>

Inheritance diagram for QwtAlphaColorMap:
QwtColorMap

Classes

class  PrivateData
 

Public Member Functions

 QwtAlphaColorMap (const QColor &=QColor(Qt::gray))
 Constructor.
 
virtual ~QwtAlphaColorMap ()
 Destructor.
 
void setAlphaInterval (int alpha1, int alpha2)
 Set the interval for the alpha coordinate.
 
int alpha1 () const
 
int alpha2 () const
 
void setColor (const QColor &)
 Set the color.
 
QColor color () const
 
virtual QRgb rgb (const QwtInterval &, double value) const QWT_OVERRIDE
 Map a value of a given interval into a alpha 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

QwtAlphaColorMap varies the alpha value of a color.

Constructor & Destructor Documentation

◆ QwtAlphaColorMap()

QwtAlphaColorMap::QwtAlphaColorMap ( const QColor &  color = QColor(Qt::gray))
explicit

Constructor.

The alpha interval is initialized by 0 to 255.

Parameters
colorColor of the map
See also
setColor(), setAlphaInterval()

Member Function Documentation

◆ alpha1()

int QwtAlphaColorMap::alpha1 ( ) const
Returns
First alpha coordinate
See also
setAlphaInterval()

◆ alpha2()

int QwtAlphaColorMap::alpha2 ( ) const
Returns
Second alpha coordinate
See also
setAlphaInterval()

◆ color()

QColor QwtAlphaColorMap::color ( ) const
Returns
the color
See also
setColor()

◆ rgb()

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

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

Parameters
intervalRange for all values
valueValue to map into a RGB value
Returns
RGB value, with an alpha value

Implements QwtColorMap.

◆ setAlphaInterval()

void QwtAlphaColorMap::setAlphaInterval ( int  alpha1,
int  alpha2 
)

Set the interval for the alpha coordinate.

alpha1/alpha2 need to be in the range 0 to 255, where 255 means opaque and 0 means transparent.

Parameters
alpha1First alpha coordinate
alpha2Second alpha coordinate
See also
alpha1(), alpha2()

◆ setColor()

void QwtAlphaColorMap::setColor ( const QColor &  color)

Set the color.

Parameters
colorColor
See also
color()

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