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.
double m_dv
The distance of the expected values, i.e.
void setColor(const std::string &)
Sets the color.
double m_vmin
The minimum value expected.
virtual bool hasControlPoints() const
Returns true.
std::vector< double > m_control_points
A set of control points that might be used for the value to color transform.
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.
The base class for the value to the color transformation.
BinToGamma class interface.
The class derived from the BinToColor class.
BinToColor * clone() const
Creates a copy of itself.
A Color class for creating the color object following the standard RGB color space.
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...
virtual bool isUserDefined() const
Returns true.