![]() |
Gamedev Framework (gf)
0.10.0
A C++14 framework for 2D games
|
A console effect on the background color. More...
#include <gf/Console.h>
Public Types | |
enum | Kind : uint32_t { None, Set, Multiply, Lighten, Darken, Screen, ColorDodge, ColorBurn, Add, AddAlpha, Burn, Overlay, Alpha, Default } |
The kind of console effect. More... | |
Public Member Functions | |
constexpr | ConsoleEffect (Kind kind) |
Constructor with a kind only. More... | |
constexpr | ConsoleEffect (Kind kind, float alpha) |
Constructor with a kind and \( \alpha \). More... | |
constexpr Kind | getKind () const noexcept |
Get the kind of effect. More... | |
constexpr bool | isDefault () const noexcept |
Check if the effect if Console::Default. More... | |
constexpr float | getAlpha () const noexcept |
Get the alpha value. More... | |
A console effect on the background color.
A console effect is used to modify the background color of the console.
If \( \textbf{b} \) is the current background color, and \( \textbf{c} \) is the wanted color, then the result color \( \textbf{r} \) is given by the following description. Note that ConsoleEffect::AddAlpha and ConsoleEffect::Alpha need an \( \alpha \) value.
enum gf::ConsoleEffect::Kind : uint32_t |
The kind of console effect.
|
inline |
Constructor with a kind only.
This constructor sould be used with all the effects, except ConsoleEffect::AddAlpha and ConsoleEffect::Alpha.
kind | The kind of effect |
|
inline |
Constructor with a kind and \( \alpha \).
This constructor should be used with ConsoleEffect::AddAlpha and ConsoleEffect::Alpha.
kind | The kind of effect |
alpha | The \( \alpha \) value |
|
inlinenoexcept |
Get the alpha value.
|
inlinenoexcept |
Get the kind of effect.
|
inlinenoexcept |
Check if the effect if Console::Default.