Updraft  1.0
Open source glider flight visualisation tool.
gradient.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_LIBRARIES_UTIL_GRADIENT_H_
00002 #define UPDRAFT_SRC_LIBRARIES_UTIL_GRADIENT_H_
00003 
00004 #include <QColor>
00005 
00006 #include "util.h"
00007 #include "linearfunc.h"
00008 
00009 namespace Updraft {
00010 namespace Util {
00011 
00013 class UTIL_EXPORT Gradient {
00014  public:
00022   Gradient(const QColor &c1, const QColor &c2, bool reverseHue = false);
00023 
00025   Gradient() {}
00026 
00029   QColor get(qreal t) const;
00030 
00031  protected:
00032   // static const double ACHROMATIC_THRESHOLD = 0.005;
00033 
00034   LinearFunc hue;
00035   LinearFunc sat;
00036   LinearFunc val;
00037   LinearFunc alpha;
00038 };
00039 
00040 }  // End namespace Util
00041 }  // End namespace Updraft
00042 
00043 #endif  // UPDRAFT_SRC_LIBRARIES_UTIL_GRADIENT_H_
00044 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines