Lionel Landwerlin da498fdb9a actor: fix allocate_align_fill() to maintain the child preferred size
When trying to clamp to pixel a box that is exactly in between 2
pixels, the clutter_actor_box_clamp_to_pixel() function changes the
size of the box.

Here is an example :

ClutterActorBox box = { 10.5, 10, 20.5, 20};

g_message ("%fx%f -> %fx%f", box.x1, box.y1, box.x2, box.y2);
clutter_actor_box_clamp_to_pixel (&box);
g_message ("%fx%f -> %fx%f", box.x1, box.y1, box.x2, box.y2);

Here is what you get :

** Message: 10.500000x10.000000 -> 20.500000x20.000000
** Message: 10.000000x10.000000 -> 21.000000x20.000000

That is because of the properties of the ceilf and floorf function
used to do the clamping.

For example, ceil(0.5) is 1.0, and ceil(-0.5) is 0.0.
And, floor(0.5) is 0.0, and floor(-0.5) is -1.0.

To work around that problem this patch retains the distance between x
and y coordinates and apply that difference before calling ceilf() on
x2 and y2.

https://bugzilla.gnome.org/show_bug.cgi?id=689073
2012-11-26 11:22:24 +00:00
..
2011-11-10 19:05:39 +01:00
2012-06-23 08:23:11 +01:00
2012-09-03 22:34:52 +01:00
2012-10-12 18:54:25 +01:00
2012-02-23 12:01:11 +00:00
2012-04-27 12:30:48 +01:00
2012-04-27 12:28:49 +01:00
2011-10-19 15:23:55 +01:00
2012-04-27 12:30:48 +01:00
2012-06-05 12:28:25 +02:00
2012-01-16 23:35:16 +00:00
2012-06-11 13:47:29 +01:00
2012-04-30 17:17:41 +01:00
2011-06-07 16:06:24 +01:00
2012-04-27 12:30:50 +01:00
2012-04-27 12:30:48 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2012-04-27 12:30:50 +01:00
2012-02-23 17:21:57 +00:00
2012-09-03 20:54:43 +01:00
2012-04-27 12:30:48 +01:00
2012-09-03 20:54:43 +01:00
2012-08-20 18:28:22 +01:00
2012-08-20 18:28:22 +01:00