#include <rgba.h>
T | The datatype of each component |
Definition at line 38 of file rgba.h.
Public Member Functions | |
Rgba () | |
Rgba (T r, T g, T b, T a) | |
Rgba< T > & | operator= (const Rgba< T > &c) |
template<typename T2> | |
Rgba< T > & | operator= (const Rgba< T2 > &c) |
bool | operator== (const Rgba< T > &c) const |
bool | operator!= (const Rgba< T > &c) const |
Public Attributes | |
T | red |
T | green |
T | blue |
T | alpha |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T> | |
std::ostream & | operator<< (std::ostream &os, const Rgba< T > &x) |
std::ostream & | operator<< (std::ostream &os, const Rgba< unsigned char > &x) |
Assignment operator.
c | The colour to copy from |
Definition at line 57 of file rgba.h.
References CVD::Rgba< T >::alpha, CVD::Rgba< T >::blue, CVD::Rgba< T >::green, and CVD::Rgba< T >::red.
Rgba<T>& CVD::Rgba< T >::operator= | ( | const Rgba< T2 > & | c | ) | [inline] |
Assignment operator between two different storage types, using the standard casts as necessary.
c | The colour to copy from |
Definition at line 63 of file rgba.h.
References CVD::Rgba< T >::alpha, CVD::Rgba< T >::blue, CVD::Rgba< T >::green, and CVD::Rgba< T >::red.
Logical equals operator.
Returns true if each component is the same.
c | Rgba to compare with |
Definition at line 73 of file rgba.h.
References CVD::Rgba< T >::alpha, CVD::Rgba< T >::blue, CVD::Rgba< T >::green, and CVD::Rgba< T >::red.
Logical not-equals operator.
Returns true unless each component is the same.
c | Rgba to compare with |
Definition at line 78 of file rgba.h.
References CVD::Rgba< T >::alpha, CVD::Rgba< T >::blue, CVD::Rgba< T >::green, and CVD::Rgba< T >::red.
std::ostream & operator<< | ( | std::ostream & | os, | |
const Rgba< T > & | x | |||
) | [related] |
std::ostream & operator<< | ( | std::ostream & | os, | |
const Rgba< unsigned char > & | x | |||
) | [related] |
The red component.
Definition at line 50 of file rgba.h.
Referenced by CVD::glColor(), CVD::Rgba< T >::operator!=(), CVD::Rgba< T >::operator=(), and CVD::Rgba< T >::operator==().
The green component.
Definition at line 51 of file rgba.h.
Referenced by CVD::glColor(), CVD::Rgba< T >::operator!=(), CVD::Rgba< T >::operator=(), and CVD::Rgba< T >::operator==().
The blue component.
Definition at line 52 of file rgba.h.
Referenced by CVD::glColor(), CVD::Rgba< T >::operator!=(), CVD::Rgba< T >::operator=(), and CVD::Rgba< T >::operator==().
The alpha component.
Definition at line 53 of file rgba.h.
Referenced by CVD::glColor(), CVD::Rgba< T >::operator!=(), CVD::Rgba< T >::operator=(), and CVD::Rgba< T >::operator==().