Describes an RGB color, with opacity, typically for UI purposes.
More...
#include <hdicoreColor.h>
|
| Color () |
| Default Color constructor; makes a black and fully opaque color.
|
|
| Color (const double r_, const double g_, const double b_, const double o_=1.0) |
| Color constructor, taking an argument for each channel.
|
|
| Color (const Color &c_) |
| Color copy constructor.
|
|
virtual | ~Color () |
| Color destructor.
|
|
virtual void | lighten (const double percentage_) |
| Lightens the color by a percentage.
|
|
virtual void | darken (const double percentage_) |
| Darkens the color by a percentage.
|
|
virtual Color & | operator= (const Color &rhs_) |
| Sets a Color object from another Color object.
|
|
virtual bool | operator== (const Color &rhs_) const |
| Tests whether a given Color object is the same as another.
|
|
virtual bool | operator!= (const Color &rhs_) const |
| Tests whether a given Color object is not the same as another.
|
|
|
double | r |
| Red channel, in range [0.0, 1.0].
|
|
double | g |
| Green channel, in range [0.0, 1.0].
|
|
double | b |
| Blue channel, in range [0.0, 1.0].
|
|
double | opacity |
| Alpha channel, in range [0.0, 1.0].
|
|
|
aip::Color * | __accessImpl (const Color &) |
|
Color | __accessCtor (const aip::Color &) |
|
Describes an RGB color, with opacity, typically for UI purposes.
◆ Color() [1/3]
hdi::core::Color::Color |
( |
| ) |
|
Default Color constructor; makes a black and fully opaque color.
- Author
- GW
- Date
- 08/2013
◆ Color() [2/3]
hdi::core::Color::Color |
( |
const double |
r_, |
|
|
const double |
g_, |
|
|
const double |
b_, |
|
|
const double |
o_ = 1.0 |
|
) |
| |
Color constructor, taking an argument for each channel.
- Author
- GW
- Date
- 08/2013
- Parameters
-
r_ | Value for red channel, in range [0.0, 1.0] |
g_ | Value for green channel, in range [0.0, 1.0] |
b_ | Value for blue channel, in range [0.0, 1.0] |
o_ | Value for alpha channel, in range [0.0, 1.0] |
◆ Color() [3/3]
hdi::core::Color::Color |
( |
const Color & |
c_ | ) |
|
Color copy constructor.
- Author
- GW
- Date
- 08/2013
- Parameters
-
c_ | Existing Color object to copy values from |
◆ ~Color()
virtual hdi::core::Color::~Color |
( |
| ) |
|
|
virtual |
Color destructor.
- Author
- GW
- Date
- 08/2013
◆ black()
static Color hdi::core::Color::black |
( |
| ) |
|
|
static |
Static accessor to get a pure black Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure black
◆ blue()
static Color hdi::core::Color::blue |
( |
| ) |
|
|
static |
Static accessor to get a pure blue Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure blue
◆ cyan()
static Color hdi::core::Color::cyan |
( |
| ) |
|
|
static |
Static accessor to get a pure cyan Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure cyan
◆ darken()
virtual void hdi::core::Color::darken |
( |
const double |
percentage_ | ) |
|
|
virtual |
Darkens the color by a percentage.
- Author
- GW
- Date
- 08/2013
- Parameters
-
percentage_ | Amount to darken the color, in range [0.0, 1.0] |
◆ darkGray()
static Color hdi::core::Color::darkGray |
( |
| ) |
|
|
static |
Static accessor to get a dark gray Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to 75% black
◆ gray()
static Color hdi::core::Color::gray |
( |
| ) |
|
|
static |
Static accessor to get a neutral gray Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to 50% black
◆ green()
static Color hdi::core::Color::green |
( |
| ) |
|
|
static |
Static accessor to get a pure green Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure green
◆ lighten()
virtual void hdi::core::Color::lighten |
( |
const double |
percentage_ | ) |
|
|
virtual |
Lightens the color by a percentage.
- Author
- GW
- Date
- 08/2013
- Parameters
-
percentage_ | Amount to lighten the color, in range [0.0, 1.0] |
◆ lightGray()
static Color hdi::core::Color::lightGray |
( |
| ) |
|
|
static |
Static accessor to get a light gray Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to 25% black
◆ magenta()
static Color hdi::core::Color::magenta |
( |
| ) |
|
|
static |
Static accessor to get a pure magenta Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure magenta
◆ operator!=()
virtual bool hdi::core::Color::operator!= |
( |
const Color & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Color object is not the same as another.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Color to compare against (righthand side of inequality operator) |
- Returns
- true for the target and rhs_ being different colors, false otherwise
◆ operator=()
virtual Color & hdi::core::Color::operator= |
( |
const Color & |
rhs_ | ) |
|
|
virtual |
Sets a Color object from another Color object.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Color object to copy values from |
- Returns
- The target object on the lefthand side of the = operator, with its values updated
◆ operator==()
virtual bool hdi::core::Color::operator== |
( |
const Color & |
rhs_ | ) |
const |
|
virtual |
Tests whether a given Color object is the same as another.
- Author
- GW
- Date
- 08/2013
- Parameters
-
rhs_ | Color to compare against (righthand side of equality operator) |
- Returns
- true for the target and rhs_ being the same color, false otherwise
◆ orange()
static Color hdi::core::Color::orange |
( |
| ) |
|
|
static |
Static accessor to get a pure orange Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure orange
◆ purple()
static Color hdi::core::Color::purple |
( |
| ) |
|
|
static |
Static accessor to get a pure purple Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure purple
◆ red()
static Color hdi::core::Color::red |
( |
| ) |
|
|
static |
Static accessor to get a pure red Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure red
◆ white()
static Color hdi::core::Color::white |
( |
| ) |
|
|
static |
Static accessor to get a pure white Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure white
◆ yellow()
static Color hdi::core::Color::yellow |
( |
| ) |
|
|
static |
Static accessor to get a pure yellow Color object.
- Author
- GW
- Date
- 08/2013
- Returns
- A Color object with its values set to pure yellow