Scalar RGBA color class. More...
#include <gelColor.h>
Public Member Functions | |
GelColor () | |
Default constructor. | |
GelColor (float red, float green, float blue, float alpha) | |
Full color constructor. | |
GelColor (float value) | |
Single color constructor. | |
GelColor (const GelHWColor &col) | |
GelHWColor constructor. | |
GelColor (const GelRGBA &col) | |
GelRGBA constructor. | |
GelColor (const GelHSLA &col) | |
GelHSLA constructor. | |
void | clamp () |
void | setRGB (float red, float green, float blue) |
Sets the RGB values of the GelColor. | |
GelColor | operator+ (const GelColor &c) const |
GelColor | operator- (const GelColor &c) const |
GelColor | operator* (const GelColor &c) const |
GelColor | operator/ (const GelColor &c) const |
GelColor | operator= (const GelColor &c) |
GelColor | operator+= (const GelColor &c) |
GelColor | operator-= (const GelColor &c) |
GelColor | operator*= (const GelColor &c) |
GelColor | operator/= (const GelColor &c) |
bool | operator== (const GelColor &c) const |
bool | operator!= (const GelColor &c) const |
Public Attributes | |
float | r |
Red component. | |
float | g |
Green component. | |
float | b |
Blue component. | |
float | a |
Alpha component. |
Scalar RGBA color class.
This class stores each color channel as a float. Range: 0.0f-1.0f.
This is the native color model in Gel2D.
gel::GelColor::GelColor | ( | ) | [inline] |
Default constructor.
gel::GelColor::GelColor | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha | ||
) | [inline] |
Full color constructor.
red | : Red value. |
green | : Green value. |
blue | : Blue value. |
alpha | : Alpha value. |
gel::GelColor::GelColor | ( | float | value | ) | [inline] |
Single color constructor.
value | : Value to apply to all components. |
gel::GelColor::GelColor | ( | const GelHWColor & | col | ) |
GelHWColor constructor.
col | : Color to assign. |
gel::GelColor::GelColor | ( | const GelRGBA & | col | ) |
GelRGBA constructor.
col | : Color to assign. |
gel::GelColor::GelColor | ( | const GelHSLA & | col | ) |
GelHSLA constructor.
col | : Color to assign. |
void gel::GelColor::clamp | ( | ) | [inline] |
void gel::GelColor::setRGB | ( | float | red, |
float | green, | ||
float | blue | ||
) | [inline] |
Sets the RGB values of the GelColor.
red | : New red value. |
green | : New green value. |
blue | : New blue value. |
bool gel::GelColor::operator== | ( | const GelColor & | c | ) | const [inline] |
bool gel::GelColor::operator!= | ( | const GelColor & | c | ) | const [inline] |
float gel::GelColor::r |
Red component.
float gel::GelColor::g |
Green component.
float gel::GelColor::b |
Blue component.
float gel::GelColor::a |
Alpha component.
API Documentation by Mark D. Procarione | Generated by |