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

Standard color model for Plot3D - implements the data driven operator()(double x, double y, double z) 更多...

#include <qwt3d_color.h>

类 Qwt3D::StandardColor 继承关系图:
Qwt3D::Color

class  PrivateData
 

Public 成员函数

 StandardColor (Qwt3D::Plot3D *data, unsigned size=100)
 Constructs a StandardColor object
 
Qwt3D::RGBA operator() (double x, double y, double z) const override
 Returns the color for a given z value
 
void setColorVector (Qwt3D::ColorVector const &cv)
 Assigns a new ColorVector
 
void reset (unsigned size=100)
 
void setAlpha (double a)
 Sets the alpha value for all colors
 
Qwt3D::ColorVector & createVector (Qwt3D::ColorVector &vec) override
 Creates color vector for ColorLegend - essentially a copy from the internal vector
 
void setPreset (const QString &presetName, unsigned size=100)
 Set colormap from a preset name
 
- Public 成员函数 继承自 Qwt3D::Color
virtual Qwt3D::RGBA operator() (Qwt3D::Triple const &t) const
 
void destroy () const
 

详细描述

Standard color model for Plot3D - implements the data driven operator()(double x, double y, double z)

The class has a ColorVector representing z values, which will be used by operator()(double x, double y, double z)

构造及析构函数说明

◆ StandardColor()

StandardColor::StandardColor(Plot3D *data, unsigned size) StandardColor::reset void(unsigned size) ( Qwt3D::Plot3D data,
unsigned  size = 100 
)
explicit

Constructs a StandardColor object

参数
dataPlot3D data source for color mapping
sizeNumber of color entries in the color vector

Creates a standard color mapping with the specified size and resets the color vector to default gradient values.

Resets the color vector to the default colormap

参数
sizeNumber of color entries to generate

Creates a color vector of the given size sampled from the viridis colormap, the modern perceptually-uniform default.

成员函数说明

◆ createVector()

Qwt3D::ColorVector & StandardColor::createVector ( Qwt3D::ColorVector &  vec)
overridevirtual

Creates color vector for ColorLegend - essentially a copy from the internal vector

参数
vecThe vector to fill
返回
Reference to the filled color vector

重载 Qwt3D::Color .

◆ operator()()

RGBA StandardColor::operator() ( double  x,
double  y,
double  z 
) const
overridevirtual

Returns the color for a given z value

参数
zThe z coordinate value for color lookup
返回
RGBA color corresponding to the z value

Maps the z value to a color index based on the data hull's z range.

实现了 Qwt3D::Color.

◆ setAlpha()

void StandardColor::setAlpha ( double  a)

Sets the alpha value for all colors

参数
aAlpha value (0.0 to 1.0)

◆ setColorVector()

void StandardColor::setColorVector ( Qwt3D::ColorVector const &  cv)

Assigns a new ColorVector

参数
cvThe new color vector (also overwrites the constructor's size argument)

◆ setPreset()

void StandardColor::setPreset ( const QString &  presetName,
unsigned  size = 100 
)

Set colormap from a preset name

参数
presetNameName of the colormap preset (e.g. "viridis", "plasma", "jet")
sizeNumber of color stops to sample from the colormap

Uses QwtColorMapPreset to create a QwtLinearColorMap and samples it at the specified number of points to fill the internal color vector.


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