Public Member Functions | Protected Attributes | Static Private Attributes | List of all members
BinToHardCandy Class Reference

This class implements a value to pastel colors. More...

#include <BinToHardCandy.h>

Inheritance diagram for BinToHardCandy:
Inheritance graph
[legend]
Collaboration diagram for BinToHardCandy:
Collaboration graph
[legend]

Public Member Functions

virtual bool acceptChangeColor () const
 Returns true if object can accept changing color,i.e.
 BinToHardCandy (const char *)
 The constructor.
 BinToHardCandy (const BinToHardCandy &)
 The copy constructor.
BinToColorclone () const
 Creates a copy of itself.
virtual void doubleToColor (double value, Color &color) const
 This function does the actual calculation that transforms the given value into a color using the current Range.
const std::vector< double > & getControlPoints () const
 Returns a list of control points.
Range getRange () const
 Get the Range of expected values.
bool hasControlPoints () const
 Retruns true.
virtual bool isUserDefined () const
 Returns true if object can be user defined.
const std::string & name () const
 Returns the name of the value to color transform.
virtual void setControlPoints (const std::vector< double > &points)
 Set the value of the control points.
void setRange (const Range &r)
 Sets the range of the values passed.

Protected Attributes

std::vector< int > m_blues
 vector of blues for color map.
std::vector< double > m_control_points
 A set of control points that might be used for the value to color transform.
double m_dv
 The distance of the expected values, i.e.
std::vector< int > m_greens
 vector of greens for color map.
std::string m_name
 The name of this value transform.
std::vector< int > m_reds
 vector of reds for color map.
double m_vmin
 The minimum value expected.

Static Private Attributes

static int blues [256]
static int greens [256]
static int reds [256]

Detailed Description

This class implements a value to pastel colors.

Author
Paul F. Kunz paul_.nosp@m.kunz.nosp@m.@slac.nosp@m..sta.nosp@m.nford.nosp@m..edu

Definition at line 26 of file BinToHardCandy.h.

Constructor & Destructor Documentation

BinToHardCandy ( const char *  name)
BinToHardCandy ( const BinToHardCandy bin_to_color)

The copy constructor.

Definition at line 84 of file BinToHardCandy.cxx.

Member Function Documentation

bool acceptChangeColor ( ) const
virtualinherited

Returns true if object can accept changing color,i.e.

enable the "Change color" button in plot inspector tabbed panel within inspector. Reimplemented in BinToBlack and BinToGreyScale. The base class implementation returns false.

Reimplemented in BinToGamma, BinToLineStyle, BinToBlack, and BinToGreyScale.

Definition at line 94 of file BinToColor.cxx.

BinToColor * clone ( ) const
virtual

Creates a copy of itself.

Implements BinToColorMap.

Definition at line 89 of file BinToHardCandy.cxx.

References BinToHardCandy::BinToHardCandy().

void doubleToColor ( double  value,
Color color 
) const
virtualinherited

This function does the actual calculation that transforms the given value into a color using the current Range.

Implements BinToColor.

Definition at line 70 of file BinToColorMap.cxx.

References BinToColorMap::m_blues, BinToColor::m_dv, BinToColorMap::m_gamma, BinToColorMap::m_greens, BinToColorMap::m_reds, BinToColor::m_vmin, and Color::setColor().

const std::vector< double > & getControlPoints ( ) const
inherited

Returns a list of control points.

If a derived class has control points to vary the transform of value to color returns the list of control points. Otherwise, the returned list is empty.

Definition at line 71 of file BinToColor.cxx.

References BinToColor::m_control_points.

Referenced by BinToColorXML::createElement().

Range getRange ( ) const
inherited

Get the Range of expected values.

Definition at line 55 of file BinToColor.cxx.

References BinToColor::m_dv, and BinToColor::m_vmin.

Referenced by ContourPointRep::createContours(), and AxisRepColor::drawColorScale().

bool hasControlPoints ( ) const
virtualinherited

Retruns true.

Reimplemented from BinToColor.

Definition at line 30 of file BinToColorMap.cxx.

bool isUserDefined ( ) const
virtualinherited

Returns true if object can be user defined.

Returns true if value to color transform can be user defined. That is, the control points for the transform are editable. This base class implementation returns false.

Reimplemented in BinToUsrDefinedScale, and BinToGamma.

Definition at line 85 of file BinToColor.cxx.

const std::string& name ( ) const
inherited

Returns the name of the value to color transform.

Reimplemented from BinToColor.

void setControlPoints ( const std::vector< double > &  points)
virtualinherited

Set the value of the control points.

Interpretation of control points is left to derived classes.

Reimplemented from BinToColor.

Definition at line 37 of file BinToColorMap.cxx.

References BinToColorMap::calcGamma(), and BinToColor::m_control_points.

void setRange ( const Range r)
inherited

Member Data Documentation

int blues
staticprivate
Initial value:
{ 116, 116, 105, 94, 84, 74, 64, 55, 46, 38, 30, 24, 18, 12,
8, 5, 2, 0, 0, 0, 1, 3, 6, 13, 14, 20, 26, 33, 41, 50, 59, 68, 78, 88,
99, 109, 120, 131, 142, 153, 163, 174, 184, 193, 202, 211, 218, 226,
232, 238, 243, 247, 250, 252, 253, 253, 253, 251, 249, 246, 241, 236,
230, 224, 216, 208, 200, 190, 181, 171, 160, 150, 139, 128, 117, 106,
96, 85, 75, 65, 56, 47, 39, 31, 24, 18, 13, 9, 5, 2, 0, 0, 0, 1, 3, 5,
9, 14, 19, 25, 32, 40, 48, 57, 67, 76, 87, 97, 108, 119, 130, 140, 151,
162, 172, 182, 192, 201, 209, 217, 225, 231, 237, 242, 246, 249, 252,
253, 254, 253, 252, 249, 246, 242, 237, 231, 225, 217, 209, 201, 192,
182, 172, 162, 151, 140, 130, 119, 108, 97, 87, 76, 67, 57, 48, 40, 32,
25, 19, 14, 9, 5, 3, 1, 0, 0, 0, 2, 5, 9, 13, 18, 24, 31, 39, 47, 56,
65, 75, 85, 96, 106, 117, 128, 139, 150, 160, 171, 181, 190, 200, 208,
216, 224, 230, 236, 241, 246, 249, 251, 253, 253, 253, 252, 250, 247,
243, 238, 232, 226, 218, 211, 202, 193, 184, 174, 163, 153, 142, 131,
120, 109, 99, 88, 78, 68, 59, 50, 41, 33, 26, 20, 14, 13, 6, 3, 1, 0, 0,
0, 2, 5, 8, 12, 18, 24, 30, 38, 46, 55, 64, 74, 84, 94, 105, 105}

Definition at line 32 of file BinToHardCandy.h.

Referenced by BinToHardCandy::BinToHardCandy().

int greens
staticprivate
Initial value:
{ 51, 51, 58, 65, 72, 79, 85, 92, 99, 105, 111, 117, 124,
129, 135, 141, 146, 152, 157, 162, 167, 171, 176, 180, 184, 188, 191,
195, 198, 201, 203, 206, 208, 210, 212, 213, 214, 215, 216, 216, 216,
216, 216, 215, 215, 213, 212, 210, 209, 206, 204, 201, 199, 195, 192,
189, 185, 181, 177, 172, 168, 163, 158, 153, 148, 142, 137, 131, 125,
119, 113, 106, 100, 93, 87, 80, 73, 67, 60, 53, 46, 39, 32, 25, 18, 11,
4, 2, 9, 16, 22, 29, 36, 42, 49, 55, 61, 68, 74, 79, 85, 91, 96, 101,
106, 111, 116, 120, 125, 129, 133, 136, 140, 143, 146, 149, 151, 153,
155, 157, 159, 160, 161, 162, 162, 162, 162, 162, 162, 161, 160, 159,
157, 155, 153, 151, 148, 146, 143, 139, 136, 132, 128, 124, 120, 115,
111, 106, 101, 95, 90, 84, 79, 73, 67, 61, 54, 48, 42, 35, 28, 22, 15,
8, 1, 5, 12, 19, 26, 33, 40, 47, 54, 61, 67, 74, 81, 88, 94, 101, 107,
113, 120, 126, 131, 137, 143, 148, 154, 159, 164, 168, 173, 177, 181,
185, 189, 193, 196, 199, 202, 204, 207, 209, 211, 212, 214, 215, 216,
216, 216, 216, 216, 216, 215, 214, 213, 212, 210, 208, 206, 203, 201,
198, 194, 191, 187, 184, 180, 175, 171, 166, 161, 156, 151, 146, 140,
135, 129, 123, 117, 111, 104, 98, 91, 85, 78, 71, 64, 57, 50, 44, 37,
30, 23, 23}

Definition at line 31 of file BinToHardCandy.h.

Referenced by BinToHardCandy::BinToHardCandy().

std::vector< int > m_blues
protectedinherited
std::vector< double > m_control_points
protectedinherited

A set of control points that might be used for the value to color transform.

Note
This vector is declared in the base class so that the implementation of getControlPoints in this base class can return an empty vector, otherwise some compilers would flag an error for not returning anything.

Definition at line 46 of file BinToColor.h.

Referenced by BinToColor::BinToColor(), BinToColorMap::BinToColorMap(), BinToColorScaleMovingBrkPt::BinToColorScaleMovingBrkPt(), BinToGamma::BinToGamma(), BinToMovingBrkPt::BinToMovingBrkPt(), BinToUsrDefinedScale::BinToUsrDefinedScale(), BinToColorMap::calcGamma(), BinToGamma::doubleToColor(), BinToMovingBrkPt::doubleToColor(), BinToUsrDefinedScale::doubleToColor(), BinToColorScaleMovingBrkPt::doubleToColor(), BinToColor::getControlPoints(), BinToColorMap::setControlPoints(), and BinToColor::setControlPoints().

double m_dv
protectedinherited
std::vector< int > m_greens
protectedinherited
std::string m_name
protectedinherited

The name of this value transform.

Definition at line 36 of file BinToColor.h.

Referenced by BinToColor::name().

std::vector< int > m_reds
protectedinherited
double m_vmin
protectedinherited
int reds
staticprivate
Initial value:
{ 4, 4, 5, 7, 9, 11, 12, 14, 15, 16, 17, 17, 18, 18, 18, 17,
16, 15, 14, 13, 11, 13, 8, 5, 3, 1, 0, 3, 5, 7, 13, 12, 13, 15, 17, 18,
19, 19, 19, 19, 19, 18, 16, 14, 12, 9, 5, 2, 2, 6, 11, 17, 23, 29, 36,
42, 49, 56, 64, 71, 78, 85, 93, 100, 106, 113, 119, 125, 130, 135, 139,
143, 146, 149, 150, 151, 152, 151, 150, 148, 145, 142, 138, 133, 127,
121, 114, 107, 99, 90, 82, 73, 63, 54, 44, 35, 25, 16, 6, 1, 13, 18, 25,
32, 38, 44, 48, 52, 55, 56, 57, 57, 56, 53, 50, 45, 39, 33, 25, 16, 6,
3, 15, 27, 40, 53, 67, 81, 96, 111, 126, 141, 156, 170, 185, 199, 212,
225, 237, 248, 252, 242, 234, 227, 222, 217, 214, 212, 212, 213, 216,
220, 225, 232, 240, 249, 251, 239, 226, 213, 198, 183, 167, 150, 133,
116, 98, 81, 64, 47, 30, 14, 1, 15, 29, 42, 54, 64, 73, 81, 87, 91, 94,
95, 95, 92, 88, 82, 75, 66, 55, 42, 28, 13, 3, 21, 40, 60, 81, 103, 125,
147, 170, 193, 216, 239, 249, 228, 207, 187, 168, 151, 134, 119, 106,
95, 85, 77, 71, 67, 65, 66, 68, 72, 79, 87, 98, 110, 124, 140, 158, 177,
197, 219, 241, 245, 221, 196, 171, 145, 120, 95, 70, 46, 23, 1, 19, 39,
57, 74, 89, 102, 112, 121, 127, 127}

Definition at line 30 of file BinToHardCandy.h.

Referenced by BinToHardCandy::BinToHardCandy().


The documentation for this class was generated from the following files:

Generated for HippoDraw Class Library by doxygen