After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682786 - Make ClutterColor use normalized [0, 1] values for each channel instead of bytes
Make ClutterColor use normalized [0, 1] values for each channel instead of bytes
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: 2.0
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: clutter-2-0
 
 
Reported: 2012-08-27 10:30 UTC by Emmanuele Bassi (:ebassi)
Modified: 2021-06-10 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emmanuele Bassi (:ebassi) 2012-08-27 10:30:20 UTC
bytes do not offer precision nor range.
Comment 1 Emmanuele Bassi (:ebassi) 2012-09-18 09:14:27 UTC
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.
Comment 2 André Klapper 2021-06-10 11:31:02 UTC
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.