Structure representing an RGB triple. More...
#include <Color.h>
Public Member Functions | |
Color (const unsigned int rgb, unsigned char alpha=255) | |
Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) | |
Color (unsigned char gray, unsigned char alpha=255) | |
Color (const bool valid=true) | |
void | red (unsigned char red) |
void | green (unsigned char green) |
void | blue (unsigned char blue) |
void | alpha (unsigned char alpha) |
unsigned char | red () const |
unsigned char | green () const |
unsigned char | blue () const |
unsigned char | alpha () const |
Color & | setRGBi (const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha=255) |
Color & | setRGBf (float red, float green, float blue, float alpha=1.0) |
bool | operator== (const Color &other) const |
bool | operator!= (const Color &other) const |
bool | operator< (const Color &other) const |
void | flushPostscript (std::ostream &) const |
std::string | svg () const |
std::string | svgAlpha (const char *prefix) const |
std::string | postscript () const |
bool | valid () const |
Static Public Attributes | |
static const Color | None |
static const Color | Black |
static const Color | Gray |
static const Color | White |
static const Color | Red |
static const Color | Green |
static const Color | Lime |
static const Color | Blue |
static const Color | Cyan |
static const Color | Magenta |
static const Color | Yellow |
static const Color | Silver |
static const Color | Purple |
static const Color | Navy |
static const Color | Aqua |
Structure representing an RGB triple.
Color structure.
examples/arithmetic.cpp, examples/arrows.cpp, examples/clipping.cpp, examples/ellipse.cpp, examples/example1.cpp, examples/example3.cpp, examples/example4.cpp, examples/graph.cpp, examples/koch.cpp, and examples/ruler.cpp.
string LibBoard::Color::svgAlpha | ( | const char * | prefix | ) | const |
Return a an SVG parameter string for the opacity value.
prefix | A prefix string to be appended to the returned string if not empty. |
Referenced by LibBoard::Text::flushSVG(), LibBoard::Arrow::flushSVG(), and LibBoard::Shape::svgProperties().