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

QwtColorMap 用于将数值映射为颜色。 更多...

#include <qwt_color_map.h>

类 QwtColorMap 继承关系图:
QwtAlphaColorMap QwtHueColorMap QwtLinearColorMap QwtSaturationValueColorMap

Public 类型

enum  Format { RGB , Indexed }
 Format for color mapping 更多...
 

Public 成员函数

 QwtColorMap (Format=QwtColorMap::RGB)
 构造函数。
 
virtual ~QwtColorMap ()
 Destructor.
 
void setFormat (Format)
 设置颜色映射的格式。
 
Format format () const
 
virtual QRgb rgb (const QwtInterval &interval, double value) const =0
 Map a value of a given interval into a RGB value.
 
virtual uint colorIndex (int numColors, const QwtInterval &interval, double value) const
 将给定区间内的数值映射为颜色索引。
 
QColor color (const QwtInterval &, double value) const
 
virtual QVector< QRgb > colorTable (int numColors) const
 构建并返回任意数量颜色的颜色映射表。
 
virtual QVector< QRgb > colorTable256 () const
 构建并返回包含 256 种颜色的颜色映射表。
 

详细描述

QwtColorMap 用于将数值映射为颜色。

成员枚举类型说明

◆ Format

Format for color mapping

参见
rgb(), colorIndex(), colorTable()
枚举值
RGB 

The map is intended to map into RGB values.

Indexed 

Map values into 8 bit values, that are used as indexes into the color table.

Indexed color maps are used to generate QImage::Format_Indexed8 images. The calculation of the color index is usually faster and the resulting image has a lower memory footprint.

参见
colorIndex(), colorTable()

构造及析构函数说明

◆ QwtColorMap()

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

构造函数。

成员函数说明

◆ colorIndex()

uint QwtColorMap::colorIndex ( int  numColors,
const QwtInterval interval,
double  value 
) const
virtual

将给定区间内的数值映射为颜色索引。

QwtLinearColorMap 重载.

◆ colorTable()

QVector< QRgb > QwtColorMap::colorTable ( int  numColors) const
virtual

构建并返回任意数量颜色的颜色映射表。

◆ colorTable256()

QVector< QRgb > QwtColorMap::colorTable256 ( ) const
virtual

构建并返回包含 256 种颜色的颜色映射表。

◆ rgb()

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

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

QwtLinearColorMap, QwtAlphaColorMap, QwtHueColorMap , 以及 QwtSaturationValueColorMap 内被实现.

◆ setFormat()

void QwtColorMap::setFormat ( Format  format)

设置颜色映射的格式。


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