62 template <
typename T2>
64 red =
static_cast<T
>(c.
red);
65 green =
static_cast<T
>(c.
green);
66 blue =
static_cast<T
>(c.
blue);
67 alpha =
static_cast<T
>(c.
alpha);
89 std::ostream& operator <<(std::ostream& os, const Rgba<T>& x)
91 return os <<
"(" << x.red <<
"," << x.green <<
","
92 << x.blue <<
"," << x.alpha <<
")";
99 inline std::ostream& operator <<(std::ostream& os, const Rgba<unsigned char>& x)
101 return os <<
"(" <<
static_cast<unsigned int>(x.red) <<
","
102 << static_cast<unsigned int>(x.green) <<
","
103 <<
static_cast<unsigned int>(x.blue) <<
","
104 << static_cast<unsigned int>(x.alpha) <<
")";
Rgba< T > & operator=(const Rgba< T2 > &c)
T green
The green component.
bool operator!=(const Rgba< T > &c) const
Rgba< T > & operator=(const Rgba< T > &c)
T alpha
The alpha component.
bool operator==(const Rgba< T > &c) const
Rgba()
Default constructor. Does nothing.
T blue
The blue component.