A utility class to encapsulate color data. More...
#include <util/color.h>
Public Member Functions | |
void | a (const T &val) |
Set the alpha component. | |
const T & | a () const |
Return the alpha component. | |
T & | a () |
Return the alpha component. | |
void | b (const T &val) |
Set the blue component. | |
const T & | b () const |
Return the blue component. | |
T & | b () |
Return the blue component. | |
Color (const T &r=T(), const T &g=T(), const T &b=T(), const T &a=T()) | |
Constructor. | |
Color (const QColor &c) | |
Color (const Vector< 4, T > ©) | |
template<typename T1 > | |
Color (const Vector< 4, T1 > &color, const T1 &scale) | |
template<typename T1 > | |
Color (const Vector< 4, T1 > &color, const T &scale=1) | |
Constructor to convert from one color type to another. | |
void | g (const T &val) |
Set the green component. | |
const T & | g () const |
Return the green component. | |
T & | g () |
Return the green component. | |
operator QColor () const | |
Color & | operator= (const T &val) |
Set all the elements to value . | |
Color & | operator= (const Vector< 4, T > &c) |
Color & | operator= (const Color &c) |
Assignment of color data. | |
void | r (const T &val) |
Set the red component. | |
const T & | r () const |
Return the red component. | |
T & | r () |
Return the red component. |
A utility class to encapsulate color data.
Definition at line 19 of file color.h.
util::Color< T >::Color | ( | const Vector< 4, T1 > & | color, | |
const T & | scale = 1 | |||
) | [inline, explicit] |
util::Color< T >::Color | ( | const T & | r = T() , |
|
const T & | g = T() , |
|||
const T & | b = T() , |
|||
const T & | a = T() | |||
) | [inline] |
void util::Color< T >::a | ( | const T & | val | ) | [inline] |
const T& util::Color< T >::a | ( | ) | const [inline] |
T& util::Color< T >::a | ( | ) | [inline] |
Return the alpha component.
Definition at line 76 of file color.h.
Referenced by util::Palette::blend(), util::convertHSVtoRGB(), and util::Palette::getColor().
00076 {return this->t();}
void util::Color< T >::b | ( | const T & | val | ) | [inline] |
const T& util::Color< T >::b | ( | ) | const [inline] |
T& util::Color< T >::b | ( | ) | [inline] |
Return the blue component.
Definition at line 71 of file color.h.
Referenced by util::Palette::blend(), util::convertHSVtoRGB(), util::Palette::getColor(), tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), bspline_tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), and util::Palette::reread().
00071 {return this->z();}
void util::Color< T >::g | ( | const T & | val | ) | [inline] |
const T& util::Color< T >::g | ( | ) | const [inline] |
T& util::Color< T >::g | ( | ) | [inline] |
Return the green component.
Definition at line 66 of file color.h.
Referenced by util::Palette::blend(), util::convertHSVtoRGB(), util::Palette::getColor(), tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), bspline_tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), and util::Palette::reread().
00066 {return this->y();}
Color< T > & util::Color< T >::operator= | ( | const T & | value | ) | [inline] |
Set all the elements to value
.
Reimplemented from util::Vector< 4, T >.
Definition at line 173 of file color.h.
References util::Color< T >::operator=().
00173 { 00174 this->Vector<4,T>::operator=(val); 00175 return *this; 00176 }
Color< T > & util::Color< T >::operator= | ( | const Color< T > & | c | ) | [inline] |
Assignment of color data.
Definition at line 167 of file color.h.
Referenced by util::Color< T >::operator=().
00167 { 00168 this->Vector<4,T>::operator=(c); 00169 return *this; 00170 }
void util::Color< T >::r | ( | const T & | val | ) | [inline] |
const T& util::Color< T >::r | ( | ) | const [inline] |
T& util::Color< T >::r | ( | ) | [inline] |
Return the red component.
Definition at line 61 of file color.h.
Referenced by util::Palette::blend(), util::convertHSVtoRGB(), util::Palette::getColor(), tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), bspline_tissue_model::TissueModel< RealModel, TissueClass >::preDraw(), and util::Palette::reread().
00061 {return this->x();}