Public Member Functions | |
Color (ClutterColor* gobject, bool make_a_copy=true) | |
Color (const Color& other) | |
Color& | operator= (const Color& other) |
~Color () | |
void | swap (Color& other) |
ClutterColor* | gobj () |
Provides access to the underlying C instance. | |
const ClutterColor* | gobj () const |
Provides access to the underlying C instance. | |
ClutterColor* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. | |
Color () | |
Color (guint8 red, guint8 green, guint8 blue, guint8 alpha=255) | |
Create a new Color object by specifying its value in RGB(A). | |
Color (guint32 pixel) | |
Create a new Color object by specifying its pixel value. | |
Color (const Glib::ustring& color) | |
void | set_from_rgb (guint8 red, guint8 blue, guint8 green) |
void | set_from_string (const Glib::ustring& color) |
Glib::ustring | to_string () const |
Return value: a newly-allocated text string. | |
void | set_from_hls (float hue, float luminance, float saturation) |
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color. | |
void | to_hls (float& hue, float& luminance, float& saturation) const |
Converts color to the HLS format. | |
void | set_from_pixel (guint32 pixel) |
Converts pixel from the packed representation of a four 8 bit channel color to a Clutter::Color. | |
guint32 | to_pixel () const |
Converts color into a packed 32 bit integer, containing all the four 8 bit channels used by Clutter::Color. | |
Color | add (const Color& color) const |
Adds a to b and saves the resulting color inside result. | |
Color | subtract (const Color& color) const |
Subtracts b from a and saves the resulting color inside result. | |
void | darken () |
Darkens color by a fixed amount, and saves the changed color in result. | |
void | lighten () |
Lightens color by a fixed amount, and saves the changed color in result. | |
void | shade (double shade) |
Shades color by factor and saves the modified color into result. | |
guint8 | get_red () const |
void | set_red (const guint8&value) |
guint8 | get_green () const |
void | set_green (const guint8&value) |
guint8 | get_blue () const |
void | set_blue (const guint8&value) |
guint8 | get_alpha () const |
void | set_alpha (const guint8&value) |
Protected Attributes | |
ClutterColor* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
Clutter::Color | wrap (ClutterColor* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Clutter::Color::Color | ( | ClutterColor * | gobject, | |
bool | make_a_copy = true | |||
) | [explicit] |
Clutter::Color::Color | ( | const Color& | other | ) |
Clutter::Color::~Color | ( | ) |
Clutter::Color::Color | ( | ) |
Clutter::Color::Color | ( | guint8 | red, | |
guint8 | green, | |||
guint8 | blue, | |||
guint8 | alpha = 255 | |||
) |
Create a new Color object by specifying its value in RGB(A).
Clutter::Color::Color | ( | guint32 | pixel | ) | [explicit] |
Create a new Color object by specifying its pixel value.
Clutter::Color::Color | ( | const Glib::ustring & | color | ) | [explicit] |
Adds a to b and saves the resulting color inside result.
The alpha channel of result is set as as the maximum value between the alpha channels of a and b.
b | A Clutter::Color. | |
result | (out): return location for the result. |
void Clutter::Color::darken | ( | ) |
Darkens color by a fixed amount, and saves the changed color in result.
result | (out): return location for the darker color. |
guint8 Clutter::Color::get_alpha | ( | ) | const |
guint8 Clutter::Color::get_blue | ( | ) | const |
guint8 Clutter::Color::get_green | ( | ) | const |
guint8 Clutter::Color::get_red | ( | ) | const |
const ClutterColor* Clutter::Color::gobj | ( | ) | const [inline] |
Provides access to the underlying C instance.
ClutterColor* Clutter::Color::gobj | ( | ) | [inline] |
Provides access to the underlying C instance.
ClutterColor* Clutter::Color::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
void Clutter::Color::lighten | ( | ) |
Lightens color by a fixed amount, and saves the changed color in result.
result | (out): return location for the lighter color. |
void Clutter::Color::set_alpha | ( | const guint8 & | value | ) |
void Clutter::Color::set_blue | ( | const guint8 & | value | ) |
void Clutter::Color::set_from_hls | ( | float | hue, | |
float | luminance, | |||
float | saturation | |||
) |
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color.
hue | Hue value, in the 0 .. 360 range. | |
luminance | Luminance value, in the 0 .. 1 range. | |
saturation | Saturation value, in the 0 .. 1 range. |
void Clutter::Color::set_from_pixel | ( | guint32 | pixel | ) |
Converts pixel from the packed representation of a four 8 bit channel color to a Clutter::Color.
pixel | A 32 bit packed integer containing a color. |
void Clutter::Color::set_from_rgb | ( | guint8 | red, | |
guint8 | blue, | |||
guint8 | green | |||
) |
void Clutter::Color::set_from_string | ( | const Glib::ustring & | color | ) |
void Clutter::Color::set_green | ( | const guint8 & | value | ) |
void Clutter::Color::set_red | ( | const guint8 & | value | ) |
void Clutter::Color::shade | ( | double | shade | ) |
Shades color by factor and saves the modified color into result.
factor | The shade factor to apply. | |
result | (out): return location for the shaded color. |
Subtracts b from a and saves the resulting color inside result.
This function assumes that the components of a are greater than the components of b; the result is, otherwise, undefined.
The alpha channel of result is set as the minimum value between the alpha channels of a and b.
b | A Clutter::Color. | |
result | (out): return location for the result. |
void Clutter::Color::swap | ( | Color& | other | ) |
void Clutter::Color::to_hls | ( | float & | hue, | |
float & | luminance, | |||
float & | saturation | |||
) | const |
Converts color to the HLS format.
The hue value is in the 0 .. 360 range. The luminance and saturation values are in the 0 .. 1 range.
hue | Return location for the hue value or 0 . | |
luminance | Return location for the luminance value or 0 . | |
saturation | Return location for the saturation value or 0 . |
guint32 Clutter::Color::to_pixel | ( | ) | const |
Converts color into a packed 32 bit integer, containing all the four 8 bit channels used by Clutter::Color.
Glib::ustring Clutter::Color::to_string | ( | ) | const |
Return value: a newly-allocated text string.
Clutter::Color wrap | ( | ClutterColor * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
ClutterColor* Clutter::Color::gobject_ [protected] |