A colour consisting of red, green, blue and alpha components.
More...
#include <rgba.h>
|
| Rgba (const Rgba &)=default |
|
Rgba & | operator= (const Rgba &)=default |
|
| Rgba (T r, T g, T b, T a) |
| Constructs a colour as specified. More...
|
|
template<class S > |
| Rgba (const Rgba< S > &rgba) |
|
template<typename T2 > |
Rgba< T > & | operator= (const Rgba< T2 > &c) |
| Assignment operator between two different storage types, using the standard casts as necessary. More...
|
|
bool | operator== (const Rgba< T > &c) const |
| Logical equals operator. More...
|
|
bool | operator!= (const Rgba< T > &c) const |
| Logical not-equals operator. More...
|
|
|
T | red |
| The red component.
|
|
T | green |
| The green component.
|
|
T | blue |
| The blue component.
|
|
T | alpha |
| The alpha component.
|
|
|
(Note that these are not member functions.)
|
template<typename T > |
std::ostream & | operator<< (std::ostream &os, const Rgba< T > &x) |
| Write the colour to a stream in the format "(red,green,blue,alpha)". More...
|
|
std::ostream & | operator<< (std::ostream &os, const Rgba< unsigned char > &x) |
| Write the colour to a stream in the format "(red,green,blue,alpha)". More...
|
|
template<typename T>
class CVD::Rgba< T >
A colour consisting of red, green, blue and alpha components.
- Parameters
-
T | The datatype of each component |
◆ Rgba()
Constructs a colour as specified.
- Parameters
-
r | The red component |
g | The green component |
b | The blue component |
a | The alpha component |
◆ operator!=()
Logical not-equals operator.
Returns true unless each component is the same.
- Parameters
-
◆ operator=()
template<typename T>
template<typename T2 >
Assignment operator between two different storage types, using the standard casts as necessary.
- Parameters
-
◆ operator==()
Logical equals operator.
Returns true if each component is the same.
- Parameters
-
◆ operator<<() [1/2]
template<typename T >
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Rgba< T > & |
x |
|
) |
| |
|
related |
Write the colour to a stream in the format "(red,green,blue,alpha)".
- Parameters
-
os | The stream |
x | The colour object |
◆ operator<<() [2/2]
template<typename T>
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const Rgba< unsigned char > & |
x |
|
) |
| |
|
related |
Write the colour to a stream in the format "(red,green,blue,alpha)".
- Parameters
-
os | The stream |
x | The colour object |
The documentation for this class was generated from the following file: