|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Standard color model for Plot3D - implements the data driven operator()(double x, double y, double z) 更多...
#include <qwt3d_color.h>
类 | |
| 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)
|
explicit |
Constructs a StandardColor object
| data | Plot3D data source for color mapping |
| 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.
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.
|
overridevirtual |
Creates color vector for ColorLegend - essentially a copy from the internal vector
| vec | The vector to fill |
重载 Qwt3D::Color .
|
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 data hull's z range.
实现了 Qwt3D::Color.
| void StandardColor::setAlpha | ( | double | a | ) |
Sets the alpha value for all colors
| a | Alpha value (0.0 to 1.0) |
| void StandardColor::setColorVector | ( | Qwt3D::ColorVector const & | cv | ) |
Assigns a new ColorVector
| cv | The new color vector (also overwrites the constructor's size argument) |
| void StandardColor::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.