actor: fix allocate_align_fill() to maintain the child preferred size
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

GNOME/clutter,djdeath/clutter,Distrotech/clutter,djdeath/clutter-android,djdeath/clutter-android,heysion/clutter-clone,djdeath/clutter-android,ebassi/clutter,ebassi/clutter,GNOME/clutter,jigpu/clutter,GNOME/clutter,djdeath/clutter,djdeath/clutter,collects/clutter,GNOME/clutter,collects/clutter,heysion/clutter-clone,GNOME/clutter,jigpu/clutter,heysion/clutter-clone,heysion/clutter-clone,ebassi/clutter,Distrotech/clutter,djdeath/clutter,djdeath/clutter-android,jigpu/clutter,jigpu/clutter,djdeath/clutter,collects/clutter,ebassi/clutter,Distrotech/clutter,jigpu/clutter,collects/clutter,Distrotech/clutter,djdeath/clutter-android,Distrotech/clutter,heysion/clutter-clone,ebassi/clutter,collects/clutter,djdeath/clutter,jigpu/clutter,Distrotech/clutter