Gamedev Framework (gf)
0.3.0
A C++11 framework for 2D games
|
A color ramp. More...
#include <gf/ColorRamp.h>
Public Member Functions | |
ColorRamp () | |
Default constructor. More... | |
bool | isEmpty () const |
Check if the color ramp is empty. More... | |
void | addColorStop (float offset, const Color4f &color) |
Add a color stop. More... | |
Color4f | computeColor (float offset) const |
Compute a color from an offset. More... | |
A color ramp.
gf::ColorRamp::ColorRamp | ( | ) |
Default constructor.
The color ramp is empty.
void gf::ColorRamp::addColorStop | ( | float | offset, |
const Color4f & | color | ||
) |
Add a color stop.
offset | The offset of the color |
color | The color |
Color4f gf::ColorRamp::computeColor | ( | float | offset | ) | const |
Compute a color from an offset.
offset | The offset of the wanted color |
bool gf::ColorRamp::isEmpty | ( | ) | const |
Check if the color ramp is empty.