GNOME Bugzilla – Bug 682786
Make ClutterColor use normalized [0, 1] values for each channel instead of bytes
Last modified: 2021-06-10 11:31:02 UTC
bytes do not offer precision nor range.
new ClutterColor API: ClutterColor *clutter_color_alloc (void); ClutterColor *clutter_color_init (double r, double g, double b, double a); ClutterColor *clutter_color_init_from_static (ClutterColor *res, ClutterStaticColor color); ClutterColor *clutter_color_init_from_color (ClutterColor *res, const ClutterColor *color); ClutterColor *clutter_color_init_from_bytes (ClutterColor *res, guint8 r, guint8 g, guint8 b, guint8 a); ClutterColor *clutter_color_init_from_string (ClutterColor *res, const char *string); ClutterColor *clutter_color_init_from_packed (ClutterColor *res, guint32 packed); ClutterColor *clutter_color_init_from_hsla (ClutterColor *res, double h, double s, double l, double a); void clutter_color_to_bytes (const ClutterColor *src, guint8 *r, guint8 *g, guint8 *b, guint8 *a); void clutter_color_to_hsla (const ClutterColor *src, double *h, double *s, double *l, double *a); guint32 clutter_color_to_packed (const ClutterColor *src); char *clutter_color_to_string (const ClutterColor *src); double clutter_color_get_red (const ClutterColor *src); double clutter_color_get_green (const ClutterColor *src); double clutter_color_get_blue (const ClutterColor *src); double clutter_color_get_alpha (const ClutterColor *src); I'm still unsure whether we should expose the structure on the stack, but that may be too big of an API break.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.