1
0
Fork 0
mutter-performance-source/doc
Emmanuele Bassi 7d674db9d2 Clean up of the ClutterColor API
The ClutterColor API has some inconsistencies:

  - the string deserialization function does not match the rest of
    the conversion function naming policy; the naming should be:

        clutter_color_parse()   ->      clutter_color_from_string()

    and the first parameter should be the ClutterColor that will
    be set from the string, not the string itself (a GDK-ism).

  - the fixed point API should not be exposed, especially in the
    form of ClutterFixed values

  - the non-fixed point HLS conversion functions do not make any
    sense. The values returned should be:

      hue        := range [ 0, 360 ]
      luminance  := range [ 0,   1 ]
      saturation := range [ 0,   1 ]

    like the current fixed point API does. Returning a value in
    the [ 0, 255 ] range is completely useless

  - the clutter_color_equal() should be converted for its use inside
    a GHashTable; a clutter_color_hash() should be added as well

  - the second parameter of the clutter_color_shade() function should
    be the shading factor, not the result (another GDK-ism). this way
    the function call can be translated from this:

      color.shade(out result, factor)

    to the more natural:

      color.shade(factor, out result)

This somewhat large commit fixes all these issues and updates the
internal users of the API.
2009-03-10 12:38:02 +00:00
..
manual 2007-06-16 Emmanuele Bassi <ebassi@openedhand.com> 2007-06-16 09:06:03 +00:00
reference Clean up of the ClutterColor API 2009-03-10 12:38:02 +00:00
clutter-actor-invariants.txt 2008-06-24 Emmanuele Bassi <ebassi@openedhand.com> 2008-06-24 10:42:36 +00:00
Makefile.am 2007-05-31 Matthew Allum <mallum@openedhand.com> 2007-05-30 23:16:58 +00:00