MorphoGraphX  2.0-1-227
Classes | Namespaces | Typedefs | Enumerations | Functions
Color.hpp File Reference
#include <Config.hpp>
#include <Clamp.hpp>
#include <math.h>
#include <QColor>
#include <Vector.hpp>
#include <vector>
#include <limits>

Go to the source code of this file.

Classes

class  mgx::Color< T >
 A utility class to encapsulate color data. More...
 

Namespaces

 mgx
 Distributed matrix library.
 
 mgx::comp
 

Typedefs

typedef Color< float > mgx::Colorf
 
typedef Color< uchar > mgx::Colorb
 
typedef std::vector< Colorb > mgx::ColorbVec
 

Enumerations

enum  mgx::comp::CompositeMode {
  mgx::comp::SOURCE, mgx::comp::DEST, mgx::comp::OVER, mgx::comp::DEST_OVER,
  mgx::comp::XOR, mgx::comp::ADD, mgx::comp::SATURATE, mgx::comp::LastSimpleComposite,
  mgx::comp::MULTIPLY, mgx::comp::SCREEN, mgx::comp::OVERLAY, mgx::comp::DARKEN,
  mgx::comp::LIGHTEN, mgx::comp::LINEAR_DODGE, mgx::comp::COLOR_DODGE, mgx::comp::LINEAR_BURN,
  mgx::comp::COLOR_BURN, mgx::comp::HARD_LIGHT, mgx::comp::SOFT_LIGHT, mgx::comp::DIFFERENCE,
  mgx::comp::EXCLUSION, mgx::comp::LastSeparableComposite, mgx::comp::LastComposite
}
 Color composition modes. More...
 

Functions

mgx_EXPORT QColor mgx::convertToQColor (const Color< float > &c)
 
mgx_EXPORT QColor mgx::convertToQColor (const Color< double > &c)
 
mgx_EXPORT QColor mgx::convertToQColor (const Color< long double > &c)
 
mgx_EXPORT QColor mgx::convertToQColor (const Color< unsigned char > &c)
 
mgx_EXPORT QColor mgx::convertToQColor (const Color< unsigned short > &c)
 
mgx_EXPORT void mgx::convertFromQColor (Color< float > &c, const QColor &col)
 
mgx_EXPORT void mgx::convertFromQColor (Color< double > &c, const QColor &col)
 
mgx_EXPORT void mgx::convertFromQColor (Color< long double > &c, const QColor &col)
 
mgx_EXPORT void mgx::convertFromQColor (Color< unsigned char > &c, const QColor &col)
 
mgx_EXPORT void mgx::convertFromQColor (Color< unsigned short > &c, const QColor &col)
 
template<class T >
Color< T > mgx::convertHSVtoRGB (T h, T s, T v)
 Return a color based on HSV values. More...
 
template<class T >
Color< T > mgx::convertHSVtoRGB (const Color< T > &hsv)
 Return a color based on HSV values. More...
 
template<class T >
Color< T > mgx::convertRGBtoHSV (const Color< T > &rgb)
 Return a color based on HSV values. More...
 
Colorf mgx::composite (const Colorf &dest, const Colorf &source, comp::CompositeMode mode=comp::OVER)
 Compose a source with dest. More...
 
Colorb mgx::composite (const Colorb &dest, const Colorb &source, comp::CompositeMode mode=comp::OVER)
 Compose a source with dest. More...
 
QStringList mgx::compModes ()
 Get the list of composition modes. More...
 
comp::CompositeMode mgx::stringToCompMode (const QString &s)
 Map Gui input string to Composition mode. More...
 
Colorb mgx::stringToColorb (const QString &s)
 Map Gui input string to Colorb. More...
 

Detailed Description

Defines the Color class template

Definition in file Color.hpp.