[clutter/clutter-1.10] actor: Round the adjusted allocation origin correctly
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.10] actor: Round the adjusted allocation origin correctly
- Date: Sat, 11 Aug 2012 09:32:46 +0000 (UTC)
commit 70b7955de0bde0b8ac129ab5f9d7ba8fbad0df3f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jul 12 22:30:53 2012 +0100
actor: Round the adjusted allocation origin correctly
We use floorf() for the allocation origin, and ceilf() for the
allocation size. Swapping the two introduces rounding errors if
the original allocation is not clamped to the nearest pixel.
(cherry picked from commit 2bec43c3c232eebd3ce12b9222fedf3a2a6f88a3)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
clutter/clutter-actor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index c3faff7..2b7c86f 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -7776,7 +7776,7 @@ adjust_for_alignment (ClutterActorAlign alignment,
case CLUTTER_ACTOR_ALIGN_CENTER:
if (allocated_size > natural_size)
{
- *allocated_start += ceilf ((allocated_size - natural_size) / 2);
+ *allocated_start += floorf ((allocated_size - natural_size) / 2);
*allocated_end = *allocated_start + MIN (allocated_size, natural_size);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]