Updraft
1.0
Open source glider flight visualisation tool.
|
Color gradient in HSV space. More...
#include <gradient.h>
Public Member Functions | |
Gradient (const QColor &c1, const QColor &c2, bool reverseHue=false) | |
Initialize the gradient with end colors. | |
Gradient () | |
Gradients made with this constructor are completely black. | |
QColor | get (qreal t) const |
Return the color at given position. | |
Protected Attributes | |
LinearFunc | hue |
LinearFunc | sat |
LinearFunc | val |
LinearFunc | alpha |
Color gradient in HSV space.
Updraft::Util::Gradient::Gradient | ( | const QColor & | c1, |
const QColor & | c2, | ||
bool | reverseHue = false |
||
) |
Initialize the gradient with end colors.
c1 | Color to start at. |
c2 | Color to stop at. |
reverseHue | If this is true, then hue is interpolated in the reverse direction -- that means it takes the longer path. Example: Gradient(Qt::red, Qt::green, false) only goes through yellow, while Gradient(Qt::red, Qt::green, true) becomes violet, blue and cyan. |
Updraft::Util::Gradient::Gradient | ( | ) | [inline] |
Gradients made with this constructor are completely black.
QColor Updraft::Util::Gradient::get | ( | qreal | t | ) | const |
Return the color at given position.
t | position in the gradient, t >= 0, t <= 1 |
LinearFunc Updraft::Util::Gradient::alpha [protected] |
LinearFunc Updraft::Util::Gradient::hue [protected] |
LinearFunc Updraft::Util::Gradient::sat [protected] |
LinearFunc Updraft::Util::Gradient::val [protected] |