zenilib
0.5.3.0
|
#include <Color.h>
Public Member Functions | |
Color () | |
Set the red, green, blue, and alpha channels using the stored type, float. More... | |
Color (const float &a, const float &r, const float &g, const float &b) | |
ARGB order is used for consistency despite interal RGBA ordering. More... | |
Color (const Uint32 &argb) | |
unsigned char | a_ub () const |
Get the alpha channel [0x00, 0xFF]. More... | |
unsigned char | b_ub () const |
Get the blue channel [0x00, 0xFF]. More... | |
unsigned char | g_ub () const |
Get the green channel [0x00, 0xFF]. More... | |
Uint32 | get_argb () const |
Get a Uint32 representation of 0xAARRGGBB. More... | |
Uint32 | get_bgra () const |
Get a Uint32 representation of 0xBBGGRRAA - Endianness swap of rgba. More... | |
Uint32 | get_rgba () const |
Get a Uint32 representation of 0xRRGGBBAA. More... | |
Color | interpolate_to (const float &rhs_part, const Color &rhs) const |
Get a color that is inbetween this color and another color. More... | |
bool | operator< (const Color &rhs) const |
To provide an arbitrary total ordering. Do not depend on it remaining the same in the future. More... | |
bool | operator== (const Color &rhs) const |
A simple equality test. Close hits are misses. More... | |
const float & | operator[] (const int &index) const |
Get 'index'. More... | |
float & | operator[] (const int &index) |
Get 'index'. More... | |
unsigned char | r_ub () const |
Get the red channel [0x00, 0xFF]. More... | |
Public Attributes | |
float | a |
float | b |
float | g |
float | r |
This class describes a color in ARGB mode.
Contact: bazal d@ze nipex .com
Zeni::Color::Color | ( | ) |
Set the red, green, blue, and alpha channels using the stored type, float.
Default value is full white (opaque)
Definition at line 22 of file Color.cpp.
Referenced by interpolate_to().
|
inline |
Get the alpha channel [0x00, 0xFF].
Definition at line 39 of file Color.hxx.
Referenced by Zeni::Video_DX9::clear_render_target(), get_argb(), get_bgra(), and get_rgba().
|
inline |
Get the blue channel [0x00, 0xFF].
Definition at line 35 of file Color.hxx.
Referenced by Zeni::Video_DX9::clear_render_target(), get_argb(), get_bgra(), and get_rgba().
|
inline |
Get the green channel [0x00, 0xFF].
Definition at line 31 of file Color.hxx.
Referenced by Zeni::Video_DX9::clear_render_target(), get_argb(), get_bgra(), and get_rgba().
|
inline |
Get a Uint32 representation of 0xAARRGGBB.
Definition at line 47 of file Color.hxx.
References a_ub(), b_ub(), g_ub(), and r_ub().
Referenced by Zeni::Vertex3f_Color::interpolate_to(), Zeni::Video_DX9::set_ambient_lighting(), Zeni::Vertex3f_Color::set_Color(), Zeni::Vertex2f_Color::set_Color(), and Zeni::Video_DX9::set_Color().
|
inline |
|
inline |
Get a color that is inbetween this color and another color.
Definition at line 46 of file Color.cpp.
References a, b, Color(), g, and r.
Referenced by Zeni::Image::extract_Color(), and Zeni::Vertex3f_Color::interpolate_to().
|
inline |
Get the red channel [0x00, 0xFF].
Definition at line 27 of file Color.hxx.
Referenced by Zeni::Video_DX9::clear_render_target(), get_argb(), get_bgra(), and get_rgba().
float Zeni::Color::a |
Definition at line 69 of file Color.h.
Referenced by interpolate_to(), operator<(), operator==(), Zeni::Popup_State::render(), Zeni::Popup_Menu_State::Sound_Check_Box::render_impl(), Zeni::Widget_Renderer_Check_Box::render_to(), Zeni::serialize(), Zeni::Video_GL_Fixed::set_clear_Color(), Zeni::Video_GL_Shader::set_clear_Color(), Zeni::Video_GL_Shader::set_Color(), Zeni::Video_GL_Fixed::set_Color(), and Zeni::unserialize().
float Zeni::Color::b |
Definition at line 68 of file Color.h.
Referenced by interpolate_to(), operator<(), operator==(), Zeni::serialize(), Zeni::Video_GL_Shader::set_clear_Color(), Zeni::Video_GL_Fixed::set_clear_Color(), Zeni::Video_GL_Shader::set_Color(), Zeni::Video_GL_Fixed::set_Color(), and Zeni::unserialize().
float Zeni::Color::g |
Definition at line 67 of file Color.h.
Referenced by interpolate_to(), operator<(), operator==(), Zeni::serialize(), Zeni::Video_GL_Shader::set_clear_Color(), Zeni::Video_GL_Fixed::set_clear_Color(), Zeni::Video_GL_Shader::set_Color(), Zeni::Video_GL_Fixed::set_Color(), and Zeni::unserialize().
float Zeni::Color::r |
Definition at line 66 of file Color.h.
Referenced by interpolate_to(), operator<(), operator==(), operator[](), Zeni::serialize(), Zeni::Video_GL_Fixed::set_clear_Color(), Zeni::Video_GL_Shader::set_clear_Color(), Zeni::Video_GL_Fixed::set_Color(), Zeni::Video_GL_Shader::set_Color(), and Zeni::unserialize().