Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Color Class Reference

#include <Color.h>

Collaboration diagram for Color:

Collaboration graph
[legend]
List of all members.

Detailed Description

A Color class for creating the color object following the standard RGB color space.

This class represents color in a way similar to color classes of GUI tool kits such as Java and Qt. It should, thus, be straight-forward to convert from one to the other.

The compiler-generated copy constructor, destructor, and assignment operator are all valid and, thus, not explicitly implemented.

See also:
http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .
Author:
Stephane Bonneaud <gandalf@slac.stanford.edu>

Definition at line 31 of file Color.h.

Public Member Functions

 Color (int red=0, int green=0, int blue=0)
 The following constructor takes red, green, and blue components as arguments.
int getBlue () const
int getGreen () const
int getRed () const
void setColor (int red=0, int green=0, int blue=0)
 Sets the color.

Static Public Attributes

static Color black
 The black color.
static Color blue
 The blue color.
static Color cyan
 The cyan color.
static Color darkgray
 The dark gray color.
static Color green
 The Green color.
static Color lightgray
 The light gray color.
static Color magenta
 The magenta color.
static Color orange
 The orange color.
static Color red
 the red color.
static Color white
 The white color.
static Color yellow
 The yellow color.

Private Attributes

int m_blue
 The blue component of the color.
int m_green
 The green component of the color.
int m_red
 The red component of the color.

Friends

std::ostream & operator<< (std::ostream &, const Color &)


Constructor & Destructor Documentation

Color::Color int  red = 0,
int  green = 0,
int  blue = 0
[explicit]
 

The following constructor takes red, green, and blue components as arguments.

The range of the values is 0 to 255. If the default values are taken, then the color will be black.

Definition at line 33 of file Color.cxx.


Member Function Documentation

int Color::getBlue  )  const
 

Definition at line 53 of file Color.cxx.

References m_blue.

Referenced by Inspector::colorSelect_2_clicked(), Inspector::colorSelect_clicked(), ColorXML::createElement(), QtViewImp::createPen(), QtViewImp::drawColorLines(), OpenGLView::drawColorLines(), EpsView::drawColorLines(), AxisRepColor::drawColorScale(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), OpenGLView::drawLines(), EpsView::drawLines(), CutRangeRep::drawNormalRange(), QtViewImp::drawPoints(), OpenGLView::drawPoints(), EpsView::drawPoints(), OpenGLView::drawPolyLine(), EpsView::drawPolyLine(), ColorBoxPointRep::drawProjectedValues(), OpenGLView::drawViewLines(), EpsView::drawViewLines(), and Inspector::updatePlotTab().

int Color::getGreen  )  const
 

Definition at line 49 of file Color.cxx.

References m_green.

Referenced by Inspector::colorSelect_2_clicked(), Inspector::colorSelect_clicked(), ColorXML::createElement(), QtViewImp::createPen(), QtViewImp::drawColorLines(), OpenGLView::drawColorLines(), EpsView::drawColorLines(), AxisRepColor::drawColorScale(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), OpenGLView::drawLines(), EpsView::drawLines(), CutRangeRep::drawNormalRange(), QtViewImp::drawPoints(), OpenGLView::drawPoints(), EpsView::drawPoints(), OpenGLView::drawPolyLine(), EpsView::drawPolyLine(), ColorBoxPointRep::drawProjectedValues(), OpenGLView::drawViewLines(), EpsView::drawViewLines(), and Inspector::updatePlotTab().

int Color::getRed  )  const
 

Definition at line 45 of file Color.cxx.

References m_red.

Referenced by Inspector::colorSelect_2_clicked(), Inspector::colorSelect_clicked(), ColorXML::createElement(), QtViewImp::createPen(), QtViewImp::drawColorLines(), OpenGLView::drawColorLines(), EpsView::drawColorLines(), AxisRepColor::drawColorScale(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), OpenGLView::drawLines(), EpsView::drawLines(), CutRangeRep::drawNormalRange(), QtViewImp::drawPoints(), OpenGLView::drawPoints(), EpsView::drawPoints(), OpenGLView::drawPolyLine(), EpsView::drawPolyLine(), ColorBoxPointRep::drawProjectedValues(), OpenGLView::drawViewLines(), EpsView::drawViewLines(), and Inspector::updatePlotTab().

void Color::setColor int  red = 0,
int  green = 0,
int  blue = 0
 

Sets the color.

Definition at line 38 of file Color.cxx.

References m_blue, m_green, and m_red.

Referenced by ColorXML::createObject(), BinToUsrDefinedScale::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToKamaeScale::doubleToColor(), BinToGreyScale::doubleToColor(), BinToFullColorScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColorScale::doubleToColor(), and BinTo3ColorScale::doubleToColor().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  ,
const Color
[friend]
 


Member Data Documentation

Color Color::black [static]
 

The black color.

Color Color::blue [static]
 

The blue color.

Referenced by FunctionRep::FunctionRep().

Color Color::cyan [static]
 

The cyan color.

Color Color::darkgray [static]
 

The dark gray color.

Color Color::green [static]
 

The Green color.

Color Color::lightgray [static]
 

The light gray color.

int Color::m_blue [private]
 

The blue component of the color.

Definition at line 42 of file Color.h.

Referenced by getBlue(), operator<<(), and setColor().

int Color::m_green [private]
 

The green component of the color.

Definition at line 39 of file Color.h.

Referenced by getGreen(), operator<<(), and setColor().

int Color::m_red [private]
 

The red component of the color.

Definition at line 36 of file Color.h.

Referenced by getRed(), operator<<(), and setColor().

Color Color::magenta [static]
 

The magenta color.

Color Color::orange [static]
 

The orange color.

Color Color::red [static]
 

the red color.

Referenced by PickTable::addDataRepButton(), FunctionRep::FunctionRep(), and LineDataRep::LineDataRep().

Color Color::white [static]
 

The white color.

Color Color::yellow [static]
 

The yellow color.

Referenced by CutRangeRep::CutRangeRep().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3