BoardLib::Color Class Reference

Structure representing an RGB triple. More...

#include <Color.h>

List of all members.

Public Member Functions

 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
ColorsetRGBi (const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha=255)
ColorsetRGBf (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 white


Detailed Description

Structure representing an RGB triple.

Color structure.

Examples:

examples/arithmetic.cc, examples/example1.cc, and examples/example2.cc.


Member Function Documentation

string BoardLib::Color::svgAlpha ( const char *  prefix  )  const

Return a an SVG parameter string for the opacity value.

Parameters:
prefix A prefix string to be appended to the returned string if not empty.
Returns:
An empty string if alpha == 255, otherwise the string <prefix>-opacity="<alpha-value>".


The documentation for this class was generated from the following files:
Generated on Fri Aug 24 19:07:40 2007 for Board by  doxygen 1.5.1