2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-color.c (clutter_color_to_string): Update the
	documentation for the format of the returned string, and remove
	the note: now clutter_color_parse() can parse the string this
	function returns.
This commit is contained in:
Emmanuele Bassi 2007-10-27 12:14:18 +00:00
parent cdb495d49a
commit f36bee599c
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.c (clutter_color_to_string): Update the
documentation for the format of the returned string, and remove
the note: now clutter_color_parse() can parse the string this
function returns.
2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/pango/pangoclutter-render.c: Last usage of guint

View File

@ -485,22 +485,24 @@ clutter_color_parse (const gchar *color,
{
gint32 result;
if (sscanf (color+1, "%x", &result))
if (sscanf (color + 1, "%x", &result))
{
if (strlen(color) == 9)
if (strlen (color) == 9)
{
dest->red = result >> 24 & 0xff;
dest->green = (result >> 16) & 0xff;
dest->blue = (result >> 8) & 0xff;
dest->alpha = result & 0xff;
return TRUE;
}
else if (strlen(color) == 7)
else if (strlen (color) == 7)
{
dest->red = (result >> 16) & 0xff;
dest->green = (result >> 8) & 0xff;
dest->blue = result & 0xff;
dest->alpha = 0xff;
return TRUE;
}
}
@ -513,6 +515,7 @@ clutter_color_parse (const gchar *color,
dest->green = pango_color.green;
dest->blue = pango_color.blue;
dest->alpha = 0xff;
return TRUE;
}
@ -524,14 +527,11 @@ clutter_color_parse (const gchar *color,
* @color: a #ClutterColor
*
* Returns a textual specification of @color in the hexadecimal form
* <literal>&num;rrrrggggbbbbaaaa</literal>, where <literal>r</literal>,
* <literal>&num;rrggbbaa</literal>, where <literal>r</literal>,
* <literal>g</literal>, <literal>b</literal> and <literal>a</literal> are
* hex digits representing the red, green, blue and alpha components
* respectively.
*
* Note: the returned string cannot be used to get the color back with
* clutter_color_parse().
*
* Return value: a newly-allocated text string
*
* Since: 0.2