#include <wg_color.h>
Definition at line 38 of file wg_color.h.
wGui::CRGBColor::CRGBColor | ( | const unsigned char | r, | |
const unsigned char | g, | |||
const unsigned char | b, | |||
const unsigned char | a = 0xFF | |||
) | [inline] |
Construct a new color object
r | Red component value | |
b | Blue component value | |
g | Green component value | |
a | Alpha value, default value of 0xFF (fully opaque) |
Definition at line 51 of file wg_color.h.
Referenced by MixNormal(), operator &(), operator+(), operator^(), and operator|().
wGui::CRGBColor::CRGBColor | ( | const Uint32 * | pColorValue, | |
const SDL_PixelFormat * | pFormat | |||
) |
wGui::CRGBColor::CRGBColor | ( | std::wstring | sColor | ) |
Construct a CRGBColor object from a text string The string can be passed one of 2 ways. 1.) A color name - "RED" 2.) An RGB comma separated value - "255,0,0"
sColor | The string to get the color code of |
Definition at line 42 of file wg_color.cpp.
References alpha, stdex::atoi(), blue, stdex::DetokenizeString(), green, and red.
unsigned long int wGui::CRGBColor::SDLColor | ( | SDL_PixelFormat * | pFormat | ) | const [inline] |
Convert the color so an SDL Color
pFormat | A pointer to the SDL Pixel Format |
Definition at line 68 of file wg_color.h.
References alpha, blue, green, and red.
Referenced by wGui::CPainter::DrawHLine(), wGui::CPainter::DrawPoint(), wGui::CPainter::DrawRect(), and wGui::CPainter::DrawVLine().
bool wGui::CRGBColor::operator== | ( | const CRGBColor & | c | ) | const [inline] |
Comparison operator does not take into account alpha values
Definition at line 73 of file wg_color.h.
bool wGui::CRGBColor::operator!= | ( | const CRGBColor & | c | ) | const [inline] |
Inequality operator does not take into accoutn alpha values
Definition at line 80 of file wg_color.h.
Does Normal color mixing
c | The color to be applied as the foreground color |
Definition at line 143 of file wg_color.cpp.
References alpha, blue, CRGBColor(), green, and red.
Referenced by wGui::CPainter::MixColor().