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

QwtHueColorMap varies the hue value of the HSV color model. 更多...

#include <qwt_colormap.h>

类 QwtHueColorMap 继承关系图:
QwtColorMap

class  PrivateData
 

Public 成员函数

 QwtHueColorMap (QwtColorMap::Format=QwtColorMap::RGB)
 Constructor.
 
void setHueInterval (int hue1, int hue2)
 Set the interval for the hue coordinate.
 
void setSaturation (int saturation)
 Set the saturation coordinate.
 
void setValue (int value)
 Set the value coordinate.
 
void setAlpha (int alpha)
 Set the alpha coordinate.
 
int hue1 () const
 Return first hue coordinate.
 
int hue2 () const
 Return second hue coordinate.
 
int saturation () const
 Return saturation coordinate.
 
int value () const
 Return value coordinate.
 
int alpha () const
 Return alpha coordinate.
 
virtual QRgb rgb (double vMin, double vMax, double value) const override
 Map a value of a given interval into a RGB 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 更多...
 

详细描述

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.

参见
QwtSaturationValueColorMap

构造及析构函数说明

◆ 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.

参数
[in]formatFormat of the color map.
参见
setHueInterval(), setSaturation(), setValue(), setAlpha()

成员函数说明

◆ alpha()

int QwtHueColorMap::alpha ( ) const

Return alpha coordinate.

返回
Alpha coordinate.
参见
setAlpha()

◆ hue1()

int QwtHueColorMap::hue1 ( ) const

Return first hue coordinate.

返回
First hue coordinate.
参见
setHueInterval()

◆ hue2()

int QwtHueColorMap::hue2 ( ) const

Return second hue coordinate.

返回
Second hue coordinate.
参见
setHueInterval()

◆ rgb()

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

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

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

实现了 QwtColorMap.

◆ saturation()

int QwtHueColorMap::saturation ( ) const

Return saturation coordinate.

返回
Saturation coordinate.
参见
setSaturation()

◆ setAlpha()

void QwtHueColorMap::setAlpha ( int  alpha)

Set the alpha coordinate.

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

参数
[in]alphaAlpha coordinate.
参见
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.

参数
[in]hue1First hue coordinate.
[in]hue2Second hue coordinate.
参见
hue1(), hue2()

◆ setSaturation()

void QwtHueColorMap::setSaturation ( int  saturation)

Set the saturation coordinate.

saturation needs to be in the range 0 to 255.

参数
[in]saturationSaturation coordinate.
参见
saturation()

◆ setValue()

void QwtHueColorMap::setValue ( int  value)

Set the value coordinate.

value needs to be in the range 0 to 255.

参数
[in]valueValue coordinate.
参见
value()

◆ value()

int QwtHueColorMap::value ( ) const

Return value coordinate.

返回
Value coordinate.
参见
setValue()

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