FTXUI
5.0.0
C++ functional terminal UI.
|
A class representing the settings for linear-gradient color effect. More...
Data Structures | |
struct | Stop |
Public Member Functions | |
LinearGradient () | |
Build the "empty" gradient. This is often followed by calls to LinearGradient::Angle() and LinearGradient::Stop(). Example: More... | |
LinearGradient (Color begin, Color end) | |
Build a gradient with two colors. More... | |
LinearGradient (float angle, Color begin, Color end) | |
Build a gradient with two colors and an angle. More... | |
LinearGradient & | Angle (float angle) |
Set the angle of the gradient. More... | |
LinearGradient & | Stop (Color color, float position) |
Add a color stop to the gradient. More... | |
LinearGradient & | Stop (Color color) |
Add a color stop to the gradient. More... | |
Data Fields | |
float | angle = 0.f |
std::vector< Stop > | stops |
A class representing the settings for linear-gradient color effect.
Example:
There are also shorthand constructors:
Definition at line 30 of file linear_gradient.hpp.
struct ftxui::LinearGradient::Stop |
Definition at line 32 of file linear_gradient.hpp.
Data Fields | ||
---|---|---|
Color | color | |
optional< float > | position |
|
default |
Build the "empty" gradient. This is often followed by calls to LinearGradient::Angle() and LinearGradient::Stop(). Example:
LinearGradient | ( | Color | begin, |
Color | end | ||
) |
Build a gradient with two colors.
begin | The color at the beginning of the gradient. |
end | The color at the end of the gradient. |
Definition at line 195 of file linear_gradient.cpp.
LinearGradient | ( | float | a, |
Color | begin, | ||
Color | end | ||
) |
Build a gradient with two colors and an angle.
a | The angle of the gradient. |
begin | The color at the beginning of the gradient. |
end | The color at the end of the gradient. |
Definition at line 203 of file linear_gradient.cpp.
LinearGradient & Angle | ( | float | a | ) |
Set the angle of the gradient.
a | The angle of the gradient. |
Definition at line 212 of file linear_gradient.cpp.
LinearGradient & Stop | ( | Color | c, |
float | p | ||
) |
Add a color stop to the gradient.
c | The color of the stop. |
p | The position of the stop. |
Definition at line 221 of file linear_gradient.cpp.
LinearGradient & Stop | ( | Color | c | ) |
Add a color stop to the gradient.
c | The color of the stop. |
Definition at line 231 of file linear_gradient.cpp.
float angle = 0.f |
Definition at line 31 of file linear_gradient.hpp.
std::vector<Stop> stops |
Definition at line 36 of file linear_gradient.hpp.