Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DrawingColor Class Reference

#include <DrawingColor.h>

List of all members.

Public Member Functions

 DrawingColor (const std::string &name="white", unsigned char red=255, unsigned char green=255, unsigned char blue=255)
 DrawingColor (const std::string &name, const std::string &postScriptOrHexTriplet)
 DrawingColor (const std::string &name, double h, double s, double v)
void set (unsigned char red, unsigned char green, unsigned char blue)
void set (const std::string &color)
void setFromHSV (double h, double s, double v)
std::string get (void) const
std::string getName (void) const
std::string getComplement (void) const
std::string getPostscript (void) const
bool useBlackInk (void) const
double getHue (void) const
double getSaturation (void) const
double getValue (void) const

Static Public Member Functions

static void setCutoffAdjustment (double value)
static double getCutoffAdjustment (void)

Private Member Functions

void _setColorFromString (const std::string &color)
void _calculateHSV (void)
unsigned char _hexCharacterToInt (const char digit)
std::string _intToHexString (unsigned char v) const

Private Attributes

std::string _name
unsigned char _red
unsigned char _green
unsigned char _blue
double _h
double _s
double _v

Static Private Attributes

static int _cutoff [36]
static double _cutoffAdjustment = 0.0

Classes

struct  compare


Constructor & Destructor Documentation

DrawingColor::DrawingColor const std::string &  name = "white",
unsigned char  red = 255,
unsigned char  green = 255,
unsigned char  blue = 255
 

DrawingColor::DrawingColor const std::string &  name,
const std::string &  postScriptOrHexTriplet
 

DrawingColor::DrawingColor const std::string &  name,
double  h,
double  s,
double  v
 


Member Function Documentation

void DrawingColor::_calculateHSV void   )  [private]
 

unsigned char DrawingColor::_hexCharacterToInt const char  digit  )  [private]
 

std::string DrawingColor::_intToHexString unsigned char  v  )  const [private]
 

void DrawingColor::_setColorFromString const std::string &  color  )  [private]
 

std::string DrawingColor::get void   )  const
 

std::string DrawingColor::getComplement void   )  const
 

double DrawingColor::getCutoffAdjustment void   )  [static]
 

double DrawingColor::getHue void   )  const [inline]
 

std::string DrawingColor::getName void   )  const
 

std::string DrawingColor::getPostscript void   )  const
 

double DrawingColor::getSaturation void   )  const [inline]
 

double DrawingColor::getValue void   )  const [inline]
 

void DrawingColor::set const std::string &  color  ) 
 

void DrawingColor::set unsigned char  red,
unsigned char  green,
unsigned char  blue
 

void DrawingColor::setCutoffAdjustment double  value  )  [static]
 

void DrawingColor::setFromHSV double  h,
double  s,
double  v
 

bool DrawingColor::useBlackInk void   )  const
 

useBlackInk(): Should a label printed with this color as a background be printed using black ink or white ink?


Member Data Documentation

unsigned char DrawingColor::_blue [private]
 

int DrawingColor::_cutoff [static, private]
 

Initial value:

{ 7, 7, 7, 6, 5, 5, 5, 5, 6, 6,
                                6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 
                                9,10,10,10,10,10,10,10, 9, 8, 
                                7, 7, 7, 7, 7, 7 }

double DrawingColor::_cutoffAdjustment = 0.0 [static, private]
 

unsigned char DrawingColor::_green [private]
 

double DrawingColor::_h [private]
 

std::string DrawingColor::_name [private]
 

unsigned char DrawingColor::_red [private]
 

double DrawingColor::_s [private]
 

double DrawingColor::_v [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4