19 using namespace hippodraw;
50 double gam= brk_pt * 8;
56 double red_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) red);
57 double green_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) green);
58 double blue_tem= 255. - (pow(((value-
m_vmin)/
m_dv), gam)) * (255.-(
double) blue);
60 int ired_tmp =
static_cast< int> ( red_tem );
61 int igreen_tmp =
static_cast< int> ( green_tem );
62 int iblue_tmp =
static_cast< int> ( blue_tem );
65 color.
setColor ( ired_tmp, igreen_tmp, iblue_tmp );
BinToGamma(const char *name)
The constructor.
The base class for the value to the color transformation.
void setColor(const std::string &)
Sets the color.
BinToGamma class interface.
The class derived from the BinToColor class.
double m_vmin
The minimum value expected.
std::vector< double > m_control_points
A set of control points that might be used for the value to color transform.
A Color class for creating the color object following the standard RGB color space.
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.
virtual bool hasControlPoints() const
Returns true.
BinToColor * clone() const
Creates a copy of itself.
virtual bool isUserDefined() const
Returns true.
double m_dv
The distance of the expected values, i.e.
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...