#include </usr1/tp517/Tumble/trunk/src/tumble/color.h>
Public Member Functions | |
Color () | |
Generate a new Color, with black values. | |
Color (float r, float g, float b) | |
Generate a new Color with given values. | |
void | assign (float r, float g, float b) |
Change current color to hold new values. | |
float | R () const |
Get value of red. | |
float | G () const |
Get value of green. | |
float | B () const |
Get value of blue. | |
bool | is_valid () const |
Check that values are valid. | |
Color | operator * (double alpha) const |
Scale color by given constant. | |
Color | operator+ (Color other) const |
Public Attributes | |
float | v [3] |
The R,G,B values of the color. All values are between 0.0 and 1.0. |
This is used by any ouput format who needs to deal with colors. The two current examples of ouptu format being OpenGL and postscript.
Definition at line 17 of file color.h.
Color::Color | ( | ) | [inline] |
Generate a new Color, with black values.
Definition at line 22 of file color.h.
References v.
Referenced by operator *(), and operator+().
Color::Color | ( | float | r, | |
float | g, | |||
float | b | |||
) | [inline] |
void Color::assign | ( | float | r, | |
float | g, | |||
float | b | |||
) | [inline] |
float Color::R | ( | ) | const [inline] |
Get value of red.
Definition at line 30 of file color.h.
References v.
Referenced by EPSWrite::set_ink().
float Color::G | ( | ) | const [inline] |
Get value of green.
Definition at line 31 of file color.h.
References v.
Referenced by EPSWrite::set_ink().
float Color::B | ( | ) | const [inline] |
Get value of blue.
Definition at line 32 of file color.h.
References v.
Referenced by EPSWrite::set_ink().
bool Color::is_valid | ( | ) | const |
Check that values are valid.
Definition at line 40 of file color.C.
References v.
Referenced by Visualization::map_color(), EPSWrite::map_rgbcolor(), EPSWrite::set_bdry_ink(), EPSWrite::set_border_ink(), and EPSWrite::set_edge_ink().
Color Color::operator * | ( | double | alpha | ) | const [inline] |
float Color::v[3] |
The R,G,B values of the color. All values are between 0.0 and 1.0.
Definition at line 19 of file color.h.
Referenced by assign(), B(), Color(), Visualization::draw_bezier_edge(), Visualization::draw_bezier_triangle(), Visualization::draw_bezier_vertex(), Visualization::draw_boundary_edge(), Visualization::draw_boundary_edge_debug(), Visualization::draw_boundary_vertex(), Visualization::draw_circle(), Visualization::draw_control_net(), Visualization::draw_point(), Visualization::draw_polygon(), G(), is_valid(), operator *(), operator+(), and R().