![]() |
Gamedev Framework (gf) 1.2.0
A C++17 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 } |
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 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.
|
inlineconstexpr |
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 |
|
inlineconstexpr |
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 |
|
inlineconstexprnoexcept |
Get the alpha value.
|
inlineconstexprnoexcept |
Get the kind of effect.