#include <Color.h>
Public Member Functions | |
Color () | |
Creates a null color (all 0, it is black really). | |
Color (const Color &color) | |
Color (int r, int g, int b) | |
Creates a RGB color. | |
virtual | ~Color () |
int | getR () const |
Returns the red component of this color. | |
int | getG () const |
Returns the green component of this color. | |
int | getB () const |
Returns the blue component of this color. | |
Color | negative () |
Color | toBlackAndWhite () |
Color & | operator= (const Color &color) |
bool | operator== (const Color &color) const |
bool | operator!= (const Color &color) const |
Color | operator+ (const Color &color) const |
Adds to each RGB components of this color the RGB components of color . | |
Color | operator- (const Color &color) const |
Substract to each RGB components of this color the RGB components of color . | |
Color | operator* (int value) const |
Multiplies each RGB components by the value . | |
Color | operator/ (int value) const |
Divides each RGB components by the value . | |
Color | operator* (double value) const |
Multiplies each RGB components by the value . | |
Color | operator/ (double value) const |
Divides each RGB components by the value . | |
Color (COLORREF rgb) | |
COLORREF | getColorRef () const |
Static Public Attributes | |
static const Color | White |
White color, RGB(255,255,255) or #ffffff. | |
static const Color | LightGray |
Light gray color, RGB(192,192,192) or #c0c0c0. | |
static const Color | Gray |
Gray color, RGB(128,128,128) or #808080. | |
static const Color | DarkGray |
Dark gray color, RGB(64,64,64) or #404040. | |
static const Color | Black |
Black color, RGB(0,0,0) or #000000. | |
static const Color | Red |
Red color, RGB(255,0,0) or #ff0000. | |
static const Color | Pink |
Pink color, RGB(255,175,175) or #ffafaf. | |
static const Color | Orange |
Orange color, RGB(255,200,0) or #ffc800. | |
static const Color | Yellow |
Yellow color, RGB(255,255,0) or #ffff00. | |
static const Color | Green |
Green color, RGB(0,255,0) or #00ff00. | |
static const Color | Magenta |
Magenta color, RGB(255,0,255) or #ff00ff. | |
static const Color | Cyan |
Cyan color, RGB(0,255,255) or #00ffff. | |
static const Color | Blue |
Blue color, RGB(0,0,255) or #0000ff. | |
Private Attributes | |
COLORREF | m_colorRef |
Color::Color | ( | ) |
Creates a null color (all 0, it is black really).
Color::Color | ( | const Color & | color | ) |
Color::Color | ( | int | r, | |
int | g, | |||
int | b | |||
) |
Creates a RGB color.
r | Red component (0-255). | |
g | Green component (0-255). | |
b | Blue component (0-255). |
Color::~Color | ( | ) | [virtual] |
Color::Color | ( | COLORREF | rgb | ) | [explicit] |
int Color::getR | ( | ) | const |
Returns the red component of this color.
int Color::getG | ( | ) | const |
Returns the green component of this color.
int Color::getB | ( | ) | const |
Returns the blue component of this color.
Color Color::negative | ( | ) |
Color Color::toBlackAndWhite | ( | ) |
bool Color::operator== | ( | const Color & | color | ) | const |
bool Color::operator!= | ( | const Color & | color | ) | const |
Adds to each RGB components of this color the RGB components of color
.
Substract to each RGB components of this color the RGB components of color
.
Color Color::operator* | ( | int | value | ) | const |
Multiplies each RGB components by the value
.
Color Color::operator/ | ( | int | value | ) | const |
Divides each RGB components by the value
.
Color Color::operator* | ( | double | value | ) | const |
Multiplies each RGB components by the value
.
Color Color::operator/ | ( | double | value | ) | const |
Divides each RGB components by the value
.
COLORREF Color::getColorRef | ( | ) | const |
const Color Color::White [static] |
White color, RGB(255,255,255) or #ffffff.
const Color Color::LightGray [static] |
Light gray color, RGB(192,192,192) or #c0c0c0.
const Color Color::Gray [static] |
Gray color, RGB(128,128,128) or #808080.
const Color Color::DarkGray [static] |
Dark gray color, RGB(64,64,64) or #404040.
const Color Color::Black [static] |
Black color, RGB(0,0,0) or #000000.
const Color Color::Red [static] |
Red color, RGB(255,0,0) or #ff0000.
const Color Color::Pink [static] |
Pink color, RGB(255,175,175) or #ffafaf.
const Color Color::Orange [static] |
Orange color, RGB(255,200,0) or #ffc800.
const Color Color::Yellow [static] |
Yellow color, RGB(255,255,0) or #ffff00.
const Color Color::Green [static] |
Green color, RGB(0,255,0) or #00ff00.
const Color Color::Magenta [static] |
Magenta color, RGB(255,0,255) or #ff00ff.
const Color Color::Cyan [static] |
Cyan color, RGB(0,255,255) or #00ffff.
const Color Color::Blue [static] |
Blue color, RGB(0,0,255) or #0000ff.
COLORREF Vaca::Color::m_colorRef [private] |