|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Standard color model for Qwt3DPlot - implements the data driven operator()(double x, double y, double z) 更多...
#include <qwt3d_color.h>
类 | |
| class | PrivateData |
Public 成员函数 | |
| Qwt3DStandardColor (unsigned size=100) | |
| Constructs a Qwt3DStandardColor object | |
| RGBA | operator() (double x, double y, double z) const override |
| Returns the color for a given z value | |
| void | setColorVector (ColorVector const &cv) |
| Assigns a new ColorVector | |
| void | reset (unsigned size=100) |
| void | setAlpha (double a) |
| Sets the alpha value for all colors | |
| ColorVector & | createVector (ColorVector &vec) override |
| Creates color vector for Qwt3DColorLegend - essentially a copy from the internal vector | |
| void | setPreset (const QString &presetName, unsigned size=100) |
| Set colormap from a preset name | |
| QString | presetName () const |
| 返回当前 preset 名称 | |
| unsigned | colorCount () const |
| 返回颜色向量中的颜色数量 | |
| double | alpha () const |
| 返回上次 setAlpha() 设置的 alpha 值 | |
Public 成员函数 继承自 Qwt3DColor | |
| virtual RGBA | operator() (Triple const &t) const |
| void | destroy () const |
| void | setActiveRange (double zMin, double zMax) |
| Sets the active z-range used for color normalization (pushed by the owning Qwt3DPlotItem before VBO/legend build) | |
额外继承的成员函数 | |
Protected 成员函数 继承自 Qwt3DColor | |
| double | activeZMin () const |
| Lower bound of the active z-range (default 0.0) | |
| double | activeZMax () const |
| Upper bound of the active z-range (default 1.0) | |
Standard color model for Qwt3DPlot - 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)
|
explicit |
Constructs a Qwt3DStandardColor object
| size | Number 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. The z-range used for color normalization is pushed in by the owning Qwt3DPlotItem via setActiveRange() (defaults to [0, 1] until set).
Resets the color vector to the default colormap
| size | Number of color entries to generate |
Creates a color vector of the given size sampled from the viridis colormap, the modern perceptually-uniform default.
| double Qwt3DStandardColor::alpha | ( | ) | const |
返回上次 setAlpha() 设置的 alpha 值
| unsigned Qwt3DStandardColor::colorCount | ( | ) | const |
返回颜色向量中的颜色数量
|
overridevirtual |
Creates color vector for Qwt3DColorLegend - essentially a copy from the internal vector
| vec | The vector to fill |
重载 Qwt3DColor .
|
overridevirtual |
Returns the color for a given z value
| z | The z coordinate value for color lookup |
Maps the z value to a color index based on the active z-range pushed in by the owning Qwt3DPlotItem via setActiveRange().
实现了 Qwt3DColor.
| QString Qwt3DStandardColor::presetName | ( | ) | const |
返回当前 preset 名称
| void Qwt3DStandardColor::setAlpha | ( | double | a | ) |
Sets the alpha value for all colors
| a | Alpha value (0.0 to 1.0) |
Silent mutation: call Qwt3DSurface::invalidateColors() to rebuild.
| void Qwt3DStandardColor::setColorVector | ( | ColorVector const & | cv | ) |
Assigns a new ColorVector
| cv | The new color vector (also overwrites the constructor's size argument) |
This is a silent mutation: the owning Qwt3DPlotItem is not notified. Call Qwt3DSurface::invalidateColors() afterwards to trigger a VBO rebuild.
| void Qwt3DStandardColor::setPreset | ( | const QString & | presetName, |
| unsigned | size = 100 |
||
| ) |
Set colormap from a preset name
| presetName | Name of the colormap preset (e.g. "viridis", "plasma", "jet") |
| size | Number 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.