32 #if defined(Color_RECURSES) 33 #error Recursive header files inclusion detected in Color.h 34 #else // defined(Color_RECURSES) 36 #define Color_RECURSES 45 #include "DGtal/base/Common.h" 46 #include <boost/lexical_cast.hpp> 86 Color(
const unsigned int aRgb,
87 unsigned char aAlpha = 255 );
110 Color(
const unsigned char aRedValue,
111 const unsigned char aGreenValue,
112 const unsigned char aBlueValue,
113 const unsigned char aAlphaValue = 255 )
125 unsigned char aAlphaValue = 255 )
140 const unsigned char aGreenValue,
141 const unsigned char aBlueValue,
142 const unsigned char aAlphaValue );
156 void red(
const unsigned char aRedValue );
158 void green(
const unsigned char aGreenValue );
160 void blue(
const unsigned char aBlueValue );
162 void alpha(
const unsigned char aAlphaValue );
164 unsigned char red()
const ;
166 unsigned char green()
const ;
168 unsigned char blue()
const ;
170 unsigned char alpha()
const ;
230 #ifdef COLOR_WITH_ALPHA_ARITH 251 #ifdef COLOR_WITH_ALPHA_ARITH 273 #ifdef COLOR_WITH_ALPHA_ARITH 293 #ifdef COLOR_WITH_ALPHA_ARITH 316 #ifdef COLOR_WITH_ALPHA_ARITH 336 #ifdef COLOR_WITH_ALPHA_ARITH 363 std::string
svg()
const;
373 std::string
svgAlpha(
const char * aPrefix )
const;
385 std::string
tikz()
const;
424 unsigned char clamp(
const double value)
const 426 return static_cast<unsigned char>(
std::max( std::min(value, 255.0), 0.0));
449 const Color &aColor );
460 operator<< ( std::ostream & out,
const Color & aColor );
468 #include "DGtal/io/Color.ih" 474 #endif // !defined Color_h 476 #undef Color_RECURSES 477 #endif // else defined(Color_RECURSES) Color & operator+=(const Color &v)
boost::uint32_t uint32_t
unsigned 32-bit integer.
unsigned char clamp(const double value) const
Color & setRGBi(const unsigned char aRedValue, const unsigned char aGreenValue, const unsigned char aBlueValue, const unsigned char aAlphaValue)
Color & operator=(const Color &pv)
unsigned char green() const
static const Color Magenta
unsigned char red() const
Color(const unsigned char aRedValue, const unsigned char aGreenValue, const unsigned char aBlueValue, const unsigned char aAlphaValue=255)
Color & setRGBA(DGtal::uint32_t aRGBA)
bool operator!=(const Color &aColor) const
static const Color Yellow
Color & operator-=(const Color &v)
bool operator<(const Color &aColor) const
std::string postscript() const
void selfDisplay(std::ostream &out) const
DGtal::uint32_t getRGBA() const
std::string svgAlpha(const char *aPrefix) const
Color(const Color &aColor)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t getRGB() const
static const Color Silver
Color & operator*=(const double coeff)
DGtal is the top-level namespace which contains all DGtal functions and types.
bool operator==(const Color &aColor) const
Color operator-(const Color &v) const
Color operator*(const double coeff) const
Color operator+(const Color &v) const
Structure representing an RGB triple with alpha component.
void flushPostscript(std::ostream &) const
unsigned char alpha() const
Color & setRGBf(float red, float green, float blue, float alpha=1.0)
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
static const Color Purple
unsigned char blue() const
Color(unsigned char aGrayValue, unsigned char aAlphaValue=255)