PNTK
|
#include <gui_color.h>
Public Member Functions | |
gui_color () | |
gui_color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) | |
gui_color (int color) | |
gui_color (gui_system_colors color) | |
int | get_value () const |
int | get_red () const |
int | get_green () const |
int | get_blue () const |
int | get_alpha () const |
int | get_BGR () const |
gui_color | op_lerp (const gui_color &color, float factor) const |
bool | operator== (const gui_color &rhs) const |
bool | operator!= (const gui_color &rhs) const |
Static Public Member Functions | |
static bool | fill_color_cache () |
A portable color abstraction class.
pntk::gui_color::gui_color | ( | ) |
Creates an empty color.
pntk::gui_color::gui_color | ( | unsigned char | red, |
unsigned char | green, | ||
unsigned char | blue, | ||
unsigned char | alpha = 255 |
||
) |
Creates a new color using the given red, green, blue, and (optional) alpha values.
pntk::gui_color::gui_color | ( | int | color | ) |
Creates a new color using the given color.
pntk::gui_color::gui_color | ( | gui_system_colors | color | ) |
Creates a new color using a system-defined color.
int pntk::gui_color::get_alpha | ( | ) | const |
Returns only the alpha value of the color.
int pntk::gui_color::get_BGR | ( | ) | const |
Returns the color as BGR (no alpha).
int pntk::gui_color::get_blue | ( | ) | const |
Returns only the blue value of the color.
int pntk::gui_color::get_green | ( | ) | const |
Returns only the green value of the color.
int pntk::gui_color::get_red | ( | ) | const |
Returns only the red value of the color.
int pntk::gui_color::get_value | ( | ) | const |
Returns the 32bit integer representation of the color.
Returns linear interpolation between this color and color given a factor value between 0.0 and 1.0.
bool pntk::gui_color::operator!= | ( | const gui_color & | rhs | ) | const |
Returns true if the compared gui_colors are not equal.
bool pntk::gui_color::operator== | ( | const gui_color & | rhs | ) | const |
Returns true if the compared gui_colors are equal.