10 #ifndef mrpt_utils_tcolor_H
11 #define mrpt_utils_tcolor_H
40 inline explicit TColor(
const unsigned int color_RGB_24bit) :
47 const unsigned int color_RGB_24bit,
57 inline operator unsigned int(
void)
const {
58 return (((
unsigned int)
R)<<16) | (((
unsigned int)G)<<8) | B;
92 A(col.A*(1.f/255)) { }
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLclampf GLclampf GLclampf alpha
GLdouble GLdouble GLdouble r
std::vector< T1 > & operator+=(std::vector< T1 > &a, const std::vector< T2 > &b)
a+=b (element-wise sum)
TColor operator+(const TColor &first, const TColor &second)
Pairwise addition of their corresponding RGBA members.
::mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, CImagePtr &pObj)
bool operator==(const CArray< T, N > &x, const CArray< T, N > &y)
CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream &s, const char *a)
TColor operator-(const TColor &first, const TColor &second)
Pairwise substraction of their corresponding RGBA members.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static TColor black
Predefined colors.
static TColor white
Predefined colors.
static TColor gray
Predefined colors.
TColor(const unsigned int color_RGB_24bit, const uint8_t alpha)
static TColor green
Predefined colors.
TColor(const unsigned int color_RGB_24bit)
static TColor blue
Predefined colors.
static TColor red
Predefined colors.
TColor(uint8_t r, uint8_t g, uint8_t b, uint8_t alpha=255)
A RGB color - floats in the range [0,1].
TColorf(const TColor &col)
TColorf(float r=0, float g=0, float b=0, float alpha=1.0f)