#include <Color.h>
Inheritance diagram for prapi::RGBColor< T >:

RGB colors are represented as three component values. In fact, RGBColor can be used in with any three-dimensional color space. The default component class is int.
Public Methods | |
| RGBColor (T clr=0) | |
| Create a new RGB color with all channels set to clr. | |
| RGBColor (T r, T g, T b) | |
| Create a new RGB color with color channels set as indicated. | |
| template<class U> | RGBColor (const Color< U, 3 > &other) |
| Create a copy of an RGB color of any type. | |
| RGBColor (const Color< T, 3 > &other) | |
| The copy constructor. | |
| RGBColor (const HSVColor< T > &other) | |
| Transform a color in the HSV color space to the RGB color space. | |
| T | getRed () const |
| Get the value of the red color channel. | |
| T | getGreen () const |
| Get the value of the green color channel. | |
| T | getBlue () const |
| Get the value of the blue color channel. | |
| void | setRed (T value) |
| Set the red color channel. | |
| void | setGreen (T value) |
| Set the green color channel. | |
| void | setBlue (T value) |
| Set the blue color channel. | |
| operator int () const | |
| Convert an RGB color to an integer. | |
| operator float () const | |
| Convert an RGB color to a float. | |
| operator double () const | |
| Convert an RGB color to a double. | |
| operator HSVColor () const | |
| Convert an RGB color to HSV. | |
| template<class U> RGBColor & | operator= (const Color< U, 3 > &other) |
| Copy a color of any content type. | |
| RGBColor & | operator= (const Color< T, 3 > &other) |
| Copy a color. | |
| RGBColor & | operator= (T value) |
| Set all color channels to value. | |
| RGBColor< double > | getNormalizedColor (void) const |
| Get a normalized version of this color. | |
Friends | |
| class | HSVColor< T > |
|
||||||||||
|
Get a normalized version of this color. Each color channel is divided by the sum of all channels. |
|
|||||||||
|
Convert an RGB color to a double. The result is the intensity of this color, i.e. the average of R, G, and B. |
|
|||||||||
|
Convert an RGB color to a float. The result is the intensity of this color, i.e. the average of R, G, and B. |
|
|||||||||
|
Convert an RGB color to HSV. This method works correctly only when float or double is used as the content type and RGB color values are in the range [0,1], or when the content type is int, and coordinates are in the range [0,255]. |
|
|||||||||
|
Convert an RGB color to an integer. The result is the intensity of this color, i.e. the average of R, G, and B. |