cgma
|
#include <CubitColor.hpp>
Public Member Functions | |
CubitColor () | |
CubitColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) | |
CubitColor (const CubitColor &other) | |
bool | operator== (const CubitColor &other) const |
bool | operator!= (const CubitColor &other) const |
Static Public Member Functions | |
static CubitColor | rgb_from_double (double r, double g, double b, double a=1.0) |
create a CubitColor from double r,g,b. double value is between 0.0 and 1.0. | |
Public Attributes | |
unsigned char | red |
unsigned char | green |
unsigned char | blue |
unsigned char | alpha |
CubitColor class to represent RGBA colors. Values are unsigned chars with a range of 0 to 255.
Definition at line 8 of file CubitColor.hpp.
CubitColor::CubitColor | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b, | ||
unsigned char | a = 255 |
||
) |
CubitColor::CubitColor | ( | const CubitColor & | other | ) |
bool CubitColor::operator!= | ( | const CubitColor & | other | ) | const |
Definition at line 25 of file CubitColor.cpp.
{ return !operator==(other); }
bool CubitColor::operator== | ( | const CubitColor & | other | ) | const |
CubitColor CubitColor::rgb_from_double | ( | double | r, |
double | g, | ||
double | b, | ||
double | a = 1.0 |
||
) | [static] |
create a CubitColor from double r,g,b. double value is between 0.0 and 1.0.
Definition at line 31 of file CubitColor.cpp.
{ return CubitColor( static_cast<unsigned char>(r*255.0), static_cast<unsigned char>(g*255.0), static_cast<unsigned char>(b*255.0), static_cast<unsigned char>(a*255.0) ); }
unsigned char CubitColor::alpha |
Definition at line 24 of file CubitColor.hpp.
unsigned char CubitColor::blue |
Definition at line 23 of file CubitColor.hpp.
unsigned char CubitColor::green |
Definition at line 22 of file CubitColor.hpp.
unsigned char CubitColor::red |
Definition at line 21 of file CubitColor.hpp.