BinToLineStyle.cxx
Go to the documentation of this file.
1 
12 #include "BinToLineStyle.h"
13 
14 namespace hippodraw {
15 
17 BinToLineStyle ( const char * name )
18  : BinToColor ( name )
19 {
20 }
21 
23  : BinToColor ( bin_to_color )
24 {
25 }
26 
28 {
29  return new BinToLineStyle ( *this );
30 }
31 
32 void
34 doubleToColor ( double, Color & color ) const
35 {
36  int red=color.getRed();
37  int green=color.getGreen();
38  int blue=color.getBlue();
39 
40  color.setColor ( red, green, blue );
41 }
42 
43 bool
46 {
47  return true;
48 }
49 
50 } // namespace hippodraw
51 
The base class for the value to the color transformation.
Definition: BinToColor.h:30
BinToLineStyle class interface.
void setColor(const std::string &)
Sets the color.
Definition: Color.cxx:112
int getRed() const
Definition: Color.cxx:164
virtual BinToColor * clone() const
Creates a copy of itself.
A Color class for creating the color object following the standard RGB color space.
Definition: Color.h:37
int getGreen() const
Definition: Color.cxx:169
BinToLineStyle(const char *name)
The constructor.
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.
The class derived from the BinToColor class.
virtual void doubleToColor(double value, Color &color) const
This function does the actual calculation that transforms the given value into a color using the curr...
int getBlue() const
Definition: Color.cxx:174

Generated for HippoDraw Class Library by doxygen