Floating point color description class (for double).
More...
#include <color.h>
List of all members.
Public Member Functions |
|
|
| | CL_Colord () |
| | Constructs a color.
|
| | CL_Colord (double r, double g, double b, double a=1.0) |
| | Constructs a color.
|
| | CL_Colord (const double *array_rgba) |
| | Constructs a color.
|
| | CL_Colord (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) |
| | Constructs a color.
|
| | CL_Colord (const CL_Color &color) |
| | CL_Colord (const CL_StringRef &hexstr) |
| | Constructs a color.
|
|
|
| void | normalize () |
| | Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0).
|
| void | set_alpha (double value) |
| | Set alpha color component, in the range 0-1.
|
| void | set_red (double value) |
| | Set red color component, in the range 0-1.
|
| void | set_green (double value) |
| | Set green color component, in the range 0-1.
|
| void | set_blue (double value) |
| | Set blue color component, in the range 0-1.
|
| bool | operator== (const CL_Colord &c) const |
| | Color == Color operator (deep compare).
|
| bool | operator!= (const CL_Colord &c) const |
| | Color != Color operator (deep compare).
|
| | operator CL_Color () const |
| | Type conversion operator.
|
Static Public Attributes |
|
|
| static CL_Colord | aliceblue |
| static CL_Colord | antiquewhite |
| static CL_Colord | aqua |
| static CL_Colord | aquamarine |
| static CL_Colord | azure |
| static CL_Colord | beige |
| static CL_Colord | bisque |
| static CL_Colord | black |
| static CL_Colord | blanchedalmond |
| static CL_Colord | blue |
| static CL_Colord | blueviolet |
| static CL_Colord | brown |
| static CL_Colord | burlywood |
| static CL_Colord | cadetblue |
| static CL_Colord | chartreuse |
| static CL_Colord | chocolate |
| static CL_Colord | coral |
| static CL_Colord | cornflowerblue |
| static CL_Colord | cornsilk |
| static CL_Colord | crimson |
| static CL_Colord | cyan |
| static CL_Colord | darkblue |
| static CL_Colord | darkcyan |
| static CL_Colord | darkgoldenrod |
| static CL_Colord | darkgray |
| static CL_Colord | darkgreen |
| static CL_Colord | darkgrey |
| static CL_Colord | darkkhaki |
| static CL_Colord | darkmagenta |
| static CL_Colord | darkolivegreen |
| static CL_Colord | darkorange |
| static CL_Colord | darkorchid |
| static CL_Colord | darkred |
| static CL_Colord | darksalmon |
| static CL_Colord | darkseagreen |
| static CL_Colord | darkslateblue |
| static CL_Colord | darkslategray |
| static CL_Colord | darkslategrey |
| static CL_Colord | darkturquoise |
| static CL_Colord | darkviolet |
| static CL_Colord | deeppink |
| static CL_Colord | deepskyblue |
| static CL_Colord | dimgray |
| static CL_Colord | dimgrey |
| static CL_Colord | dodgerblue |
| static CL_Colord | firebrick |
| static CL_Colord | floralwhite |
| static CL_Colord | forestgreen |
| static CL_Colord | fuchsia |
| static CL_Colord | gainsboro |
| static CL_Colord | ghostwhite |
| static CL_Colord | gold |
| static CL_Colord | goldenrod |
| static CL_Colord | gray |
| static CL_Colord | grey |
| static CL_Colord | green |
| static CL_Colord | greenyellow |
| static CL_Colord | honeydew |
| static CL_Colord | hotpink |
| static CL_Colord | indianred |
| static CL_Colord | indigo |
| static CL_Colord | ivory |
| static CL_Colord | khaki |
| static CL_Colord | lavender |
| static CL_Colord | lavenderblush |
| static CL_Colord | lawngreen |
| static CL_Colord | lemonchiffon |
| static CL_Colord | lightblue |
| static CL_Colord | lightcoral |
| static CL_Colord | lightcyan |
| static CL_Colord | lightgoldenrodyellow |
| static CL_Colord | lightgray |
| static CL_Colord | lightgreen |
| static CL_Colord | lightgrey |
| static CL_Colord | lightpink |
| static CL_Colord | lightsalmon |
| static CL_Colord | lightseagreen |
| static CL_Colord | lightskyblue |
| static CL_Colord | lightslategray |
| static CL_Colord | lightslategrey |
| static CL_Colord | lightsteelblue |
| static CL_Colord | lightyellow |
| static CL_Colord | lime |
| static CL_Colord | limegreen |
| static CL_Colord | linen |
| static CL_Colord | magenta |
| static CL_Colord | maroon |
| static CL_Colord | mediumaquamarine |
| static CL_Colord | mediumblue |
| static CL_Colord | mediumorchid |
| static CL_Colord | mediumpurple |
| static CL_Colord | mediumseagreen |
| static CL_Colord | mediumslateblue |
| static CL_Colord | mediumspringgreen |
| static CL_Colord | mediumturquoise |
| static CL_Colord | mediumvioletred |
| static CL_Colord | midnightblue |
| static CL_Colord | mintcream |
| static CL_Colord | mistyrose |
| static CL_Colord | moccasin |
| static CL_Colord | navajowhite |
| static CL_Colord | navy |
| static CL_Colord | oldlace |
| static CL_Colord | olive |
| static CL_Colord | olivedrab |
| static CL_Colord | orange |
| static CL_Colord | orangered |
| static CL_Colord | orchid |
| static CL_Colord | palegoldenrod |
| static CL_Colord | palegreen |
| static CL_Colord | paleturquoise |
| static CL_Colord | palevioletred |
| static CL_Colord | papayawhip |
| static CL_Colord | peachpuff |
| static CL_Colord | peru |
| static CL_Colord | pink |
| static CL_Colord | plum |
| static CL_Colord | powderblue |
| static CL_Colord | purple |
| static CL_Colord | red |
| static CL_Colord | rosybrown |
| static CL_Colord | royalblue |
| static CL_Colord | saddlebrown |
| static CL_Colord | salmon |
| static CL_Colord | sandybrown |
| static CL_Colord | seagreen |
| static CL_Colord | seashell |
| static CL_Colord | sienna |
| static CL_Colord | silver |
| static CL_Colord | skyblue |
| static CL_Colord | slateblue |
| static CL_Colord | slategray |
| static CL_Colord | slategrey |
| static CL_Colord | snow |
| static CL_Colord | springgreen |
| static CL_Colord | steelblue |
| static CL_Colord | tan |
| static CL_Colord | teal |
| static CL_Colord | thistle |
| static CL_Colord | tomato |
| static CL_Colord | turquoise |
| static CL_Colord | violet |
| static CL_Colord | wheat |
| static CL_Colord | white |
| static CL_Colord | whitesmoke |
| static CL_Colord | yellow |
| static CL_Colord | yellowgreen |
| static CL_Colord | transparent |
| | rgba(0, 0, 0, 0).
|
| static CL_Colord | gray10 |
| static CL_Colord | gray20 |
| static CL_Colord | gray30 |
| static CL_Colord | gray40 |
| static CL_Colord | gray50 |
| static CL_Colord | gray60 |
| static CL_Colord | gray70 |
| static CL_Colord | gray80 |
| static CL_Colord | gray90 |
Attributes |
|
| double | r |
| double | g |
| double | b |
| double | a |
| double | get_red () const |
| | Get Red.
|
| double | get_green () const |
| | Get Green.
|
| double | get_blue () const |
| | Get Blue.
|
| double | get_alpha () const |
| | Get Alpha.
|
Detailed Description
Floating point color description class (for double).
Constructor & Destructor Documentation
| CL_Colord::CL_Colord |
( |
|
) |
[inline] |
| CL_Colord::CL_Colord |
( |
double |
r, |
|
|
double |
g, |
|
|
double |
b, |
|
|
double |
a = 1.0 | |
|
) |
| | [inline] |
Constructs a color.
Color components are specified in the range 0 to 1.
An alpha value of 0 means complete transparency, while 1 means completely opaque (solid).
- Parameters:
-
| r | = Red color component. |
| g | = Green color component. |
| b | = Blue color component. |
| a | = Alpha (transparency) color component. |
| CL_Colord::CL_Colord |
( |
const double * |
array_rgba |
) |
[inline] |
Constructs a color.
Color components are specified in the range 0 to 1.
An alpha value of 0 means complete transparency, while 1 means completely opaque (solid).
- Parameters:
-
| array_rgba | = Red,Green,Blue,Alpha color component. |
| CL_Colord::CL_Colord |
( |
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a = 255 | |
|
) |
| | [inline] |
Constructs a color.
Color components are specified in the range 0 to 255.
An alpha value of 0 means complete transparency, while 255 means completely opaque (solid).
- Parameters:
-
| r | = Red color component. |
| g | = Green color component. |
| b | = Blue color component. |
| a | = Alpha (transparency) color component. |
| CL_Colord::CL_Colord |
( |
const CL_Color & |
color |
) |
[inline, explicit] |
| CL_Colord::CL_Colord |
( |
const CL_StringRef & |
hexstr |
) |
[inline] |
Constructs a color.
Color components are specified in the range 0 to 255.
An alpha value of 0 means complete transparency, while 255 means completely opaque (solid).
- Parameters:
-
| hexstr | The colors rgba components as a hexadecimal string of the format "#rrggbbaa", where the '#' and "aa" parts are optional. |
References CL_Color::find_color().
Member Function Documentation
| double CL_Colord::get_alpha |
( |
|
) |
const [inline] |
Get Alpha.
- Returns:
- alpha
References a.
| double CL_Colord::get_blue |
( |
|
) |
const [inline] |
Get Blue.
- Returns:
- blue
References b.
| double CL_Colord::get_green |
( |
|
) |
const [inline] |
Get Green.
- Returns:
- green
References g.
| double CL_Colord::get_red |
( |
|
) |
const [inline] |
Get Red.
- Returns:
- red
References r.
| void CL_Colord::normalize |
( |
|
) |
[inline] |
Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0).
References a, b, g, and r.
| CL_Colord::operator CL_Color |
( |
|
) |
const [inline] |
Type conversion operator.
| bool CL_Colord::operator!= |
( |
const CL_Colord & |
c |
) |
const [inline] |
Color != Color operator (deep compare).
References a, b, g, and r.
| bool CL_Colord::operator== |
( |
const CL_Colord & |
c |
) |
const [inline] |
Color == Color operator (deep compare).
References a, b, g, and r.
| void CL_Colord::set_alpha |
( |
double |
value |
) |
[inline] |
Set alpha color component, in the range 0-1.
References a.
| void CL_Colord::set_blue |
( |
double |
value |
) |
[inline] |
Set blue color component, in the range 0-1.
References b.
| void CL_Colord::set_green |
( |
double |
value |
) |
[inline] |
Set green color component, in the range 0-1.
References g.
| void CL_Colord::set_red |
( |
double |
value |
) |
[inline] |
Set red color component, in the range 0-1.
References r.
Member Data Documentation
The documentation for this class was generated from the following file: