1
0
Fork 0

actor-box: Correctly clamp to pixel

Use ceilf() to round up the right side of the actor's box, and floorf()
to round down the left side.
This commit is contained in:
Emmanuele Bassi 2010-08-16 16:02:53 +01:00 committed by Robert Bragg
parent f5f066df9c
commit 8a2e164354

View file

@ -9211,10 +9211,10 @@ clutter_actor_box_clamp_to_pixel (ClutterActorBox *box)
{
g_return_if_fail (box != NULL);
box->x1 = floorf (box->x1 + 0.5);
box->y1 = floorf (box->y1 + 0.5);
box->x2 = floorf (box->x2 + 0.5);
box->y2 = floorf (box->y2 + 0.5);
box->x1 = floorf (box->x1);
box->y1 = floorf (box->y1);
box->x2 = ceilf (box->x2);
box->y2 = ceilf (box->y2);
}
/******************************************************************************/