30 Color::Color(
const float &a_,
const float &r_,
const float &g_,
const float &b_)
39 :
r(((argb >> 16) & 0xFF) / 256.0
f),
40 g(((argb >> 8) & 0xFF) / 256.0
f),
41 b((argb & 0xFF) / 256.0
f),
42 a(((argb >> 24) & 0xFF) / 256.0
f)
47 float lhs_part = 1.0f - rhs_part;
48 return Color(lhs_part *
a + rhs_part * rhs.
a,
49 lhs_part *
r + rhs_part * rhs.
r,
50 lhs_part *
g + rhs_part * rhs.
g,
51 lhs_part *
b + rhs_part * rhs.
b);
55 return a < rhs.
a || (
a == rhs.
a &&
56 (
r < rhs.
r || (
r == rhs.
r &&
57 (
g < rhs.
g || (
g == rhs.
g &&
bool operator<(const Color &rhs) const
To provide an arbitrary total ordering. Do not depend on it remaining the same in the future...
GLboolean GLboolean GLboolean GLboolean a
std::istream & unserialize(std::istream &is, Color &value)
std::ostream & serialize(std::ostream &os, const Color &value)
uint32_t Uint32
An unsigned 32-bit integer type.
Color interpolate_to(const float &rhs_part, const Color &rhs) const
Get a color that is inbetween this color and another color.
EGLSurface EGLint void ** value
Color()
Set the red, green, blue, and alpha channels using the stored type, float.
bool operator==(const Color &rhs) const
A simple equality test. Close hits are misses.
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble b