QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | 所有成员列表
QwtAlphaColorMap类 参考

QwtAlphaColorMap varies the alpha value of a color. 更多...

#include <qwt_colormap.h>

类 QwtAlphaColorMap 继承关系图:
QwtColorMap

class  PrivateData
 

Public 成员函数

 QwtAlphaColorMap (const QColor &=QColor(Qt::gray))
 Constructor.
 
void setAlphaInterval (int alpha1, int alpha2)
 Set the interval for the alpha coordinate.
 
int alpha1 () const
 Return first alpha coordinate.
 
int alpha2 () const
 Return second alpha coordinate.
 
void setColor (const QColor &)
 Set the color.
 
QColor color () const
 Return the color.
 
virtual QRgb rgb (double vMin, double vMax, double value) const override
 Map a value of a given interval into a alpha value.
 
- Public 成员函数 继承自 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, double vMin, double vMax, double value) const
 Map a value of a given interval into a color index.
 
QColor color (double vMin, double vMax, double value) const
 
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.
 

额外继承的成员函数

- Public 类型 继承自 QwtColorMap
enum  Format { RGB , Indexed }
 Format for color mapping 更多...
 

详细描述

QwtAlphaColorMap varies the alpha value of a color.

构造及析构函数说明

◆ QwtAlphaColorMap()

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

Constructor.

The alpha interval is initialized by 0 to 255.

参数
[in]colorColor of the map.
参见
setColor(), setAlphaInterval()

成员函数说明

◆ alpha1()

int QwtAlphaColorMap::alpha1 ( ) const

Return first alpha coordinate.

返回
First alpha coordinate.
参见
setAlphaInterval()

◆ alpha2()

int QwtAlphaColorMap::alpha2 ( ) const

Return second alpha coordinate.

返回
Second alpha coordinate.
参见
setAlphaInterval()

◆ color()

QColor QwtAlphaColorMap::color ( ) const

Return the color.

返回
The color.
参见
setColor()

◆ rgb()

QRgb QwtAlphaColorMap::rgb ( double  vMin,
double  vMax,
double  value 
) const
overridevirtual

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

参数
[in]vMinMinimum of the value interval.
[in]vMaxMaximum of the value interval.
[in]valueValue to map into a RGB value.
返回
RGB value, with an alpha value.

实现了 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.

参数
[in]alpha1First alpha coordinate.
[in]alpha2Second alpha coordinate.
参见
alpha1(), alpha2()

◆ setColor()

void QwtAlphaColorMap::setColor ( const QColor &  color)

Set the color.

参数
[in]colorColor.
参见
color()

该类的文档由以下文件生成: