CVD 0.8
|
A colour consisting of red, green and blue components. More...
#include <rgb.h>
Public Member Functions | |
Rgb () | |
Rgb (T r, T g, T b) | |
template<class S > | |
Rgb (const Rgb< S > &rgb) | |
Rgb< T > & | operator= (const Rgb< T > &c) |
bool | operator== (const Rgb< T > &c) const |
bool | operator!= (const Rgb< T > &c) const |
template<class T2 > | |
Rgb< T > & | operator= (const Rgb< T2 > &c) |
Public Attributes | |
T | red |
T | green |
T | blue |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, const Rgb< T > &x) |
std::ostream & | operator<< (std::ostream &os, const Rgb< char > &x) |
std::ostream & | operator<< (std::ostream &os, const Rgb< byte > &x) |
A colour consisting of red, green and blue components.
Often used to store 24-bit colour information, i.e. CVD::Rgb<CVD::byte>
T | The datatype of each component |
Assignment operator.
c | The colour to copy from |
Definition at line 66 of file rgb.h.
References CVD::Rgb< T >::blue, CVD::Rgb< T >::green, and CVD::Rgb< T >::red.
Logical equals operator.
Returns true if each component is the same.
c | Rgb to compare with |
Definition at line 71 of file rgb.h.
References CVD::Rgb< T >::blue, CVD::Rgb< T >::green, and CVD::Rgb< T >::red.
Logical not-equals operator.
Returns true unless each component is the same.
c | Rgb to compare with |
Definition at line 76 of file rgb.h.
References CVD::Rgb< T >::blue, CVD::Rgb< T >::green, and CVD::Rgb< T >::red.
Rgb<T>& CVD::Rgb< T >::operator= | ( | const Rgb< 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 82 of file rgb.h.
References CVD::Rgb< T >::blue, CVD::Rgb< T >::green, and CVD::Rgb< T >::red.
std::ostream & operator<< | ( | std::ostream & | os, |
const Rgb< T > & | x | ||
) | [related] |
std::ostream & operator<< | ( | std::ostream & | os, |
const Rgb< char > & | x | ||
) | [related] |