inline Color(); inline Color(const Color & c); inline Color(const Color & c, UByte a8); inline Color(const Color & c, Color ac); inline Color(UInt32 raw32); inline Color(UInt32 raw32, UByte a8); inline Color(UByte red, UByte green, UByte blue, UByte a8 = 0); SF_EXPORT Color(int x, int y, int z, Model model); SF_EXPORT Color(int x, int y, int z, int a8, Model model); SF_EXPORT Color(Double x, Double y, Double z, Model model); SF_EXPORT Color(Double x, Double y, Double z, Double aD, Model model);
Color() constructors provide convenient initialization methods, similar to the SetColor functions. The constructors initialize the red, green, blue, alpha components of a new color object.
Parameters |
Description |
const Color & c |
A color whose components set those of the current color. |
UByte a8 |
A value containing the 8-bit alpha channel. |
Color ac |
A color whose alpha component is set the the current color's alpha channel. |
UInt32 raw32 |
A 32-bit ARGB value whose components set those of the current color. |
UByte red |
A value containing the red component of the current color. |
UByte green |
A value containing the green component of the current color. |
UByte blue |
A value containing the blue component of the current color. |
int x |
An integer or floating point point value containing the first component of the triplet, which is used when initializing the color with a specific Model. |
int y |
An integer or floating point value containing the second component of the triplet, which is used when initializing the color with a specific Model. |
int z |
An integer or floating point value containing the third component of the triplet, which is used when initializing the color with a specific Model. |
Model model |
A value specifying the Model (color space) of the (xyz) triplet, which is used to initialize the current color. |
Double aD |
A value containing the double precision floating point alpha channel. |
a1 |
A value containing the 1-bit alpha channel (on/off). |
a4 |
A value containing the 4-bit alpha channel. |
aF |
A value containing the floating point alpha channel. |
c12 |
A 12-bit color whose components set those of the current color. |
c15 |
A 15-bit color whose components set those of the current color. |
c16 |
A 16-bit color whose components set those of the current color. |
c24 |
A 24-bit color whose components set those of the current color. |
c32 |
A 32-bit color whose components set those of the current color. |
cf |
A floating point color whose components set those of the current color. |
cd |
A double precision floating point color whose components set those of the current color. |
color |
A string containing the hex value or color name, which is set to the current color. |