#include <colorHSV.h>
Public Member Functions | |
Constructors | |
ColorHSV () throw () | |
Default Constructor. | |
ColorHSV (const ColorHSV &color) throw () | |
Copy constructor. | |
ColorHSV (const ColorRGBA &color) throw () | |
Constructor with ColorRGBA. | |
ColorHSV (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) | |
Constructor with parameter char*. | |
ColorHSV (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) | |
Constructor with Parameter string. | |
ColorHSV (const ColorUnitHue &hue, const ColorUnit &saturation, const ColorUnit &value) throw () | |
Detailed component initializing constructor. | |
Destructors | |
virtual | ~ColorHSV () throw () |
Destructor. | |
virtual void | clear () throw () |
Explicit default initialization. | |
Converters | |
operator String () const throw () | |
Conversion to string. | |
Assignment | |
void | set (const ColorHSV &color) throw () |
Assignment. | |
const ColorHSV & | operator= (const ColorHSV &color) throw () |
Assignment operator. | |
void | set (const ColorRGBA &color) throw () |
Assignment with ColorRGBA. | |
const ColorHSV & | operator= (const ColorRGBA &color) throw () |
Assignment operator with ColorRGBA. | |
void | get (ColorRGBA &color) const throw () |
Copying to ColorRGBA. | |
void | set (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment with char*. | |
const ColorHSV & | operator= (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment operator with char*. | |
void | get (char *value) const throw () |
Copying to char*. | |
void | set (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment with string. | |
const ColorHSV & | operator= (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment operator with string. | |
void | get (String &value) const throw () |
Copying to string. | |
void | swap (ColorHSV &color) throw () |
Swapping of colorHSVs. | |
Accessors: inspectors and mutators | |
void | setHue (const ColorUnitHue &hue) throw () |
Changes the value of the hue component. | |
ColorUnitHue & | getHue () throw () |
Mutable inspection of the hue component. | |
const ColorUnitHue & | getHue () const throw () |
Non-mutable inspection of the hue component. | |
void | setSaturation (const ColorUnit &saturation) throw () |
Changes the value of the saturation component. | |
ColorUnit & | getSaturation () throw () |
Mutable inspection of the saturation component. | |
const ColorUnit & | getSaturation () const throw () |
Non-mutable inspection of the saturation component. | |
void | setValue (const ColorUnit &value) throw () |
Changes the value of the value component. | |
ColorUnit & | getValue () throw () |
Mutable inspection of the value component. | |
const ColorUnit & | getValue () const throw () |
Non-mutable inspection of the value component. | |
void | set (const ColorUnitHue &hue, const ColorUnit &saturation, const ColorUnit &value) throw () |
Changes the values of the hue, saturation and value component. | |
void | get (ColorUnitHue &hue, ColorUnit &saturation, ColorUnit &value) const throw () |
Inspection of the colorHSV's components. | |
Predicates | |
bool | operator== (const ColorHSV &color) const throw () |
Equality test. | |
bool | operator!= (const ColorHSV &color) const throw () |
Unequality test. | |
bool | operator< (const ColorHSV &color) const throw () |
Smaller test. | |
bool | operator<= (const ColorHSV &color) const throw () |
Smaller or equal test. | |
bool | operator> (const ColorHSV &color) const throw () |
Greater test. | |
bool | operator>= (const ColorHSV &color) const throw () |
Greater or equal test. | |
debuggers and diagnostics | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
Internal value dump. | |
Friends | |
Class friends | |
| |
class | ColorRGBA |
Storers | |
std::istream & | operator>> (std::istream &s, ColorHSV &color) |
Friendly stream input. | |
std::ostream & | operator<< (std::ostream &s, const ColorHSV &color) |
Friendly stream output. |
An instance of ColorHSV represents a color consisting of the components hue, saturation and value. The components staturation and values are ColorUnit 's. The component hue is of class type ColorUnitHue . See description of these classes for further informations concerning type conversions.
|
Default Constructor. Constructs new colorHSV. Initialized with color black (hue=0, saturation=0, value=0).
|
|
Copy constructor.
|
|
Constructor with ColorRGBA.
|
|
Constructor with parameter char*. Constructs new colorHSV by initialising its value with the given pointer to a string representing a color value in hex format. The length of the string can either be 6 or 7 characters depending whether the hue component is 2 or 3 bytes long. See ColorUnitHue and ColorUnit for information concerning to string format.
|
|
Constructor with Parameter string. Constructs new ColorHSV by initialising its value with a string representing a color value in hex format. The length of the string can either be 6 or 7 characters depending whether the hue component is 2 or 3 bytes long. See ColorUnitHue and ColorUnit for information concerning to string format.
|
|
Detailed component initializing constructor.
|
|
Destructor.
|
|
Explicit default initialization. Sets the color of this colorHSV to the default color (black). The value of this colorHSV is:
|
|
Internal value dump. Dumps the current color of this colorHSV to the output ostream s with dumping depth depth.
|
|
Inspection of the colorHSV's components.
|
|
Copying to string. Calls set. The string value is initialized to the color of this colorHSV. The format of the string is the same as the one given to the constructor.
|
|
Copying to char*. Calls set. The string value is initialized to the color of this colorHSV. At least 8 bytes must be allocated for the string. The format of the string is the same as the one given to the constructor.
|
|
Copying to ColorRGBA. Calls set. The color of the colorRGBA color is initialized to the color of this colorHSV.
|
|
Non-mutable inspection of the hue component. For further information see ColorUnitHue& getHue(). |
|
Mutable inspection of the hue component. Accesses the mutual reference of the hue component of this colorHSV. See ColorUnitHue for further information concerning type conversion.
|
|
Non-mutable inspection of the saturation component.
|
|
Mutable inspection of the saturation component.
|
|
Non-mutable inspection of the value component. For further information see ColorUnit& getValue(). |
|
Mutable inspection of the value component.
|
|
Conversion to string.
|
|
Unequality test.
|
|
Smaller test. Smaller means that all components of this are smaller than all the components of color colorHSV. |
|
Smaller or equal test. Smaller or equal means that all components of this are smaller or equal than all the components of color colorHSV. |
|
Assignment operator with string. Assigns the color represented by the string value to this colorHSV. Calls set. See constructor for format description.
|
|
Assignment operator with char*. Calls set. The color of this is initialized to the color represented by the string value. See constructor for format description.
|
|
Assignment operator with ColorRGBA. Assigns the colorRGBA color to this colorHSV. Calls set. The color of this is initialized to the color of the colorRGBA color.
|
|
Assignment operator. Calls set. |
|
Equality test.
|
|
Greater test. Greater means that all components of this are greater than all the components of color colorHSV. |
|
Greater or equal test. Greater or equal means that all components of this are greater or equal than all the components of color colorHSV. |
|
Changes the values of the hue, saturation and value component.
|
|
Assignment with string. Assigns the color represented by the string value to this colorHSV. The color of this is initialized to the color represented by the string value. See constructor for format description.
|
|
Assignment with char*. The color of this is initialized to the color represented by the string value. See constructor for format description.
|
|
Assignment with ColorRGBA. The color of this is initialized to the color of the colorRGBA color. |
|
Assignment.
|
|
Changes the value of the hue component. Changes the value of of the hue component of this colorHSV to the value represented by the parameter hue. See ColorUnitHue for further information concerning the format.
|
|
Changes the value of the saturation component.
|
|
Changes the value of the value component.
|
|
Swapping of colorHSVs.
|
|
Friendly stream output. Writes colorHSV data to the output stream s and store the color of this. The color will be stored as an vector in integer format. The output will look like '(0-360, 0-255, 0-255)'. This method is provided for convienience.
|
|
Friendly stream input. Reads colorHSV data from the input stream s and restore the color of this. The hue, saturation and value component are read as integers from the input stream. The method expects an vector as written as the one by the output stream operator. This method is provided for convienience.
|