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
replaced with COGLuint. (Tommi Komulainen)
{
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;
}
}
dest->green = pango_color.green;
dest->blue = pango_color.blue;
dest->alpha = 0xff;
+
return TRUE;
}
* @color: a #ClutterColor
*
* Returns a textual specification of @color in the hexadecimal form
- * <literal>#rrrrggggbbbbaaaa</literal>, where <literal>r</literal>,
+ * <literal>#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