![]() |
![]() |
![]() |
Clutter 0.0 Reference Manual | ![]() |
---|---|---|---|---|
#define CLUTTER_TYPE_COLOR ClutterColor; GType clutter_color_get_type (void); void clutter_color_add (const ClutterColor *src1, const ClutterColor *src2, ClutterColor *dest); void clutter_color_subtract (const ClutterColor *src1, const ClutterColor *src2, ClutterColor *dest); void clutter_color_lighten (const ClutterColor *src, ClutterColor *dest); void clutter_color_darken (const ClutterColor *src, ClutterColor *dest); void clutter_color_shade (const ClutterColor *src, ClutterColor *dest, gdouble shade); void clutter_color_to_hls (const ClutterColor *src, guint8 *hue, guint8 *luminance, guint8 *saturation); void clutter_color_from_hls (ClutterColor *dest, guint8 hue, guint8 luminance, guint8 saturation); guint32 clutter_color_to_pixel (const ClutterColor *src); void clutter_color_from_pixel (ClutterColor *dest, guint32 pixel);
void clutter_color_add (const ClutterColor *src1, const ClutterColor *src2, ClutterColor *dest);
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
.
src1 : |
a ClutterColor |
src2 : |
a ClutterColor |
dest : |
return location for the result |
void clutter_color_subtract (const ClutterColor *src1, const ClutterColor *src2, ClutterColor *dest);
Subtracts src2
from src1
and saves the resulting
color inside dest
.
The alpha channel of dest
is set as the minimum value
between the alpha channels of src1
and src2
.
src1 : |
a ClutterColor |
src2 : |
a ClutterColor |
dest : |
return location for the result |
void clutter_color_lighten (const ClutterColor *src, ClutterColor *dest);
Lightens src
by a fixed amount, and saves the changed
color in dest
.
src : |
a ClutterColor |
dest : |
return location for the lighter color |
void clutter_color_darken (const ClutterColor *src, ClutterColor *dest);
Darkens src
by a fixed amount, and saves the changed color
in dest
.
src : |
a ClutterColor |
dest : |
return location for the darker color |
void clutter_color_shade (const ClutterColor *src, ClutterColor *dest, gdouble shade);
Shades src
by the factor of shade
and saves the modified
color into dest
.
src : |
a ClutterColor |
dest : |
return location for the shaded color |
shade : |
the shade factor to apply |
void clutter_color_to_hls (const ClutterColor *src, guint8 *hue, guint8 *luminance, guint8 *saturation);
Converts src
to the HLS format.
src : |
a ClutterColor |
hue : |
return location for the hue value or NULL
|
luminance : |
return location for the luminance value or NULL
|
saturation : |
return location for the saturation value or NULL
|
void clutter_color_from_hls (ClutterColor *dest, guint8 hue, guint8 luminance, guint8 saturation);
Converts a color expressed in HLS (hue, luminance and saturation) values into a ClutterColor.
dest : |
return location for a ClutterColor |
hue : |
hue value (0 .. 255) |
luminance : |
luminance value (0 .. 255) |
saturation : |
saturation value (0 .. 255) |
guint32 clutter_color_to_pixel (const ClutterColor *src);
Converts src
into a packed 32 bit integer, containing
all the four 8 bit channels used by ClutterColor.
src : |
a ClutterColor |
Returns : | a packed color |
void clutter_color_from_pixel (ClutterColor *dest, guint32 pixel);
Converts pixel
from the packed representation of a four 8 bit channel
color to a ClutterColor.
dest : |
return location for a ClutterColor |
pixel : |
a 32 bit packed integer containing a color |