A colour consisting of red, green, blue and alpha components.
More...
#include <argb.h>
|
| Argb () |
| Default constructor. Sets everything to 0.
|
|
| Argb (T a, T r, T g, T b) |
| Constructs a colour as specified. More...
|
|
template<typename T2 > |
Argb< T > & | operator= (const Argb< T2 > &c) |
| Assignment operator between two different storage types, using the standard casts as necessary. More...
|
|
bool | operator== (const Argb< T > &c) const |
| Logical equals operator. More...
|
|
bool | operator!= (const Argb< T > &c) const |
| Logical not-equals operator. More...
|
|
|
T | blue |
| The blue component.
|
|
T | green |
| The green component.
|
|
T | red |
| The red component.
|
|
T | alpha |
| The alpha component.
|
|
|
(Note that these are not member functions.)
|
template<typename T > |
std::ostream & | operator<< (std::ostream &os, const Argb< T > &x) |
| Write the colour to a stream in the format "(red,green,blue,alpha)". More...
|
|
std::ostream & | operator<< (std::ostream &os, const Argb< unsigned char > &x) |
| Write the colour to a stream in the format "(red,green,blue,alpha)". More...
|
|
template<typename T>
class CVD::Argb< T >
A colour consisting of red, green, blue and alpha components.
- Parameters
-
T | The datatype of each component |
◆ Argb()
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 Argb< 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 Argb< 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: