2007-10-01 Tomas Frydrych <tf@openedhand.com>
authorTomas Frydrych <tf@openedhand.com>
Mon, 1 Oct 2007 15:26:09 +0000 (15:26 +0000)
committerTomas Frydrych <tf@openedhand.com>
Mon, 1 Oct 2007 15:26:09 +0000 (15:26 +0000)
* clutter/clutter-actor.c:
(clutter_actor_set_scale_with_gravityx):
Use CLUTTER_QMUL for better precission (#532, patch by Gwenole
Beauchesne).

* clutter/clutter-color.c:
(clutter_color_to_hlsx):
Added missing CLUTTER_INT_TO_FIXED conversion (#544, patch by Neil
Roberts).

ChangeLog
clutter/clutter-actor.c
clutter/clutter-color.c

index 4854344..274113e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-10-01  Tomas Frydrych  <tf@openedhand.com>
+       
+       * clutter/clutter-actor.c:
+       (clutter_actor_set_scale_with_gravityx):
+       Use CLUTTER_QMUL for better precission (#532, patch by Gwenole
+       Beauchesne).
+
+       * clutter/clutter-color.c:
+       (clutter_color_to_hlsx):
+       Added missing CLUTTER_INT_TO_FIXED conversion (#544, patch by Neil
+       Roberts).
+
 2007-10-01  Neil J. Patel  <njp@o-hand.com>
 
        Patch by: Tommi Komulainen <tommi.komulainen@iki.fi>
index cf84eea..a69d960 100644 (file)
@@ -2085,10 +2085,10 @@ clutter_actor_set_scale_with_gravityx (ClutterActor     *self,
 
   clutter_actor_query_coords (self, &box);
 
-  w  = CFX_MUL (box.x2 - box.x1, old_scale_x);
-  h  = CFX_MUL (box.y2 - box.y1, old_scale_y);
-  sw = CFX_MUL (box.x2 - box.x1, scale_x);
-  sh = CFX_MUL (box.y2 - box.y1, scale_y);
+  w  = CFX_QMUL (box.x2 - box.x1, old_scale_x);
+  h  = CFX_QMUL (box.y2 - box.y1, old_scale_y);
+  sw = CFX_QMUL (box.x2 - box.x1, scale_x);
+  sh = CFX_QMUL (box.y2 - box.y1, scale_y);
 
   
   x = box.x1;
index 3218ca6..17219a9 100644 (file)
@@ -189,7 +189,7 @@ clutter_color_to_hlsx (const ClutterColor *src,
       if (l <= CFX_ONE/2)
        s = CFX_DIV ((max - min), (max + min));
       else
-       s = CFX_DIV ((max - min), (2 - max - min));
+       s = CFX_DIV ((max - min), (CLUTTER_INT_TO_FIXED (2) - max - min));
 
       delta = max - min;
       if (red == max)