#include <color.h>
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 (guint8 hue, guint8 luminance, guint8 saturation) | |||
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color. | ||||
void | set_from_hlsx (Fixed hue, Fixed luminance, Fixed saturation) | |||
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color. | ||||
void | to_hls (guint8 &hue, guint8 &luminance, guint8 &saturation) const | |||
Converts src to the HLS format. | ||||
void | to_hlsx (Fixed &hue, Fixed &luminance, Fixed &saturation) const | |||
Converts src 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 src into a packed 32 bit integer, containing all the four 8 bit channels used by Clutter::Color. | ||||
Color | add (const Color &color) const | |||
Adds src2 to src1 and saves the resulting color inside dest. | ||||
Color | subtract (const Color &color) const | |||
Subtracts src2 from src1 and saves the resulting color inside dest. | ||||
void | darken () | |||
Darkens src by a fixed amount, and saves the changed color in dest. | ||||
void | lighten () | |||
Lightens src by a fixed amount, and saves the changed color in dest. | ||||
void | shade (double shade) | |||
Shades src by the factor of shade and saves the modified color into dest. | ||||
void | shadex (Fixed shade) | |||
Fixed point version of clutter_color_shade(). | ||||
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.) | ||||
Color | operator+ (const Color &color1, const Color &color2) | |||
| ||||
Color | operator- (const Color &color1, const Color &color2) | |||
| ||||
bool | operator== (const Color &lhs, const Color &rhs) | |||
| ||||
bool | operator!= (const Color &lhs, const Color &rhs) | |||
| ||||
void | swap (Color &lhs, Color &rhs) | |||
| ||||
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] |
void Clutter::Color::swap | ( | Color & | other | ) |
ClutterColor* Clutter::Color::gobj | ( | ) | [inline] |
Provides access to the underlying C instance.
const ClutterColor* Clutter::Color::gobj | ( | ) | const [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::set_from_rgb | ( | guint8 | red, | |
guint8 | blue, | |||
guint8 | green | |||
) |
void Clutter::Color::set_from_string | ( | const Glib::ustring & | color | ) |
Glib::ustring Clutter::Color::to_string | ( | ) | const |
Return value: a newly-allocated text string.
void Clutter::Color::set_from_hls | ( | guint8 | hue, | |
guint8 | luminance, | |||
guint8 | saturation | |||
) |
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color.
hue | Hue value (0 .. 255). | |
luminance | Luminance value (0 .. 255). | |
saturation | Saturation value (0 .. 255). |
Converts a color expressed in HLS (hue, luminance and saturation) values into a Clutter::Color.
hue | Hue value (0 .. 360). | |
luminance | Luminance value (0 .. 1). | |
saturation | Saturation value (0 .. 1). |
void Clutter::Color::to_hls | ( | guint8 & | hue, | |
guint8 & | luminance, | |||
guint8 & | saturation | |||
) | const |
Converts src to the HLS format.
Returned HLS values are from interval 0 .. 255.
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 . |
Converts src to the HLS format.
Returned hue is in degrees (0 .. 360), luminance and saturation from interval <0 .. 1>.
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 . |
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. |
guint32 Clutter::Color::to_pixel | ( | ) | const |
Converts src into a packed 32 bit integer, containing all the four 8 bit channels used by Clutter::Color.
Adds src2 to src1 and saves the resulting color inside dest.
The alpha channel of dest is as the maximum value between the alpha channels of src1 and src2.
src2 | A Clutter::Color. | |
dest | Return location for the result. |
Subtracts src2 from src1 and saves the resulting color inside dest.
This function assumes that the components of src1 are greater than the components of src2; the result is, otherwise, undefined.
The alpha channel of dest is set as the minimum value between the alpha channels of src1 and src2.
src2 | A Clutter::Color. | |
dest | Return location for the result. |
void Clutter::Color::darken | ( | ) |
Darkens src by a fixed amount, and saves the changed color in dest.
dest | Return location for the darker color. |
void Clutter::Color::lighten | ( | ) |
Lightens src by a fixed amount, and saves the changed color in dest.
dest | Return location for the lighter color. |
void Clutter::Color::shade | ( | double | shade | ) |
Shades src by the factor of shade and saves the modified color into dest.
dest | Return location for the shaded color. | |
shade | The shade factor to apply. |
void Clutter::Color::shadex | ( | Fixed | shade | ) |
Fixed point version of clutter_color_shade().
Shades src by the factor of shade and saves the modified color into dest.
Since: 0.2
dest | Return location for the shaded color. | |
shade | Clutter::Fixed the shade factor to apply. |
guint8 Clutter::Color::get_red | ( | ) | const |
void Clutter::Color::set_red | ( | const guint8 & | value | ) |
guint8 Clutter::Color::get_green | ( | ) | const |
void Clutter::Color::set_green | ( | const guint8 & | value | ) |
guint8 Clutter::Color::get_blue | ( | ) | const |
void Clutter::Color::set_blue | ( | const guint8 & | value | ) |
guint8 Clutter::Color::get_alpha | ( | ) | const |
void Clutter::Color::set_alpha | ( | const guint8 & | value | ) |
lhs | The left-hand side |
rhs | The right-hand side |
lhs | The left-hand side |
rhs | The right-hand side |
lhs | The left-hand side |
rhs | The right-hand side |
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] |