|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
线性渐变配置 更多...
#include <linear_gradient.hpp>
Public 成员函数 | |
| linear_gradient () | |
| 默认构造 | |
| linear_gradient (_NEFORCE color begin, struct color end) | |
| 从起止颜色构造 | |
| linear_gradient & | angle (const float a) |
| 设置渐变角度 | |
| linear_gradient & | add_stop (const struct color &c, optional< float > pos=none) |
| 添加色标 | |
| _NEFORCE color | sample (float t) const |
| 在指定位置采样颜色 | |
从起止颜色构造
| begin | 起始颜色 |
| end | 结束颜色 |
在文件 linear_gradient.hpp 第 64 行定义.
引用了 neforce::begin(), neforce::tui::color() , 以及 neforce::end().
|
inline |
添加色标
| c | 颜色 |
| pos | 位置(none 自动分配) |
在文件 linear_gradient.hpp 第 85 行定义.
引用了 neforce::tui::color(), linear_gradient() , 以及 neforce::none.
|
inline |
|
inlinenodiscard |
在指定位置采样颜色
| t | 归一化位置 (0.0-1.0) |
在文件 linear_gradient.hpp 第 95 行定义.
引用了 neforce::tui::color(), neforce::color::lerp() , 以及 neforce::optional< T >::value_or().