From 8ceca9b2bb760eacf2a338f2845fd93e1afb73c6 Mon Sep 17 00:00:00 2001 From: hermet Date: Tue, 24 May 2011 04:50:29 +0000 Subject: [PATCH] elementary / transit - fixed afterimage indirectly. git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@59633 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_transit.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c index 96e1d53..cd83929 100644 --- a/src/lib/elm_transit.c +++ b/src/lib/elm_transit.c @@ -162,6 +162,46 @@ _elm_transit_object_remove_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, if (!transit->objs) elm_transit_del(transit); } +//TODO: Remove! +//Since evas map have a afterimage bug for this time. +//This function is added temporary. +static void +_obj_damage_area_set(Evas_Object *obj) +{ + const Evas_Map *map; + Evas_Coord_Point coords; + Evas_Coord_Point min, max; + int i; + + map = evas_object_map_get(obj); + if (!map) return; + + evas_map_point_coord_get(map, 0, &coords.x, &coords.y, NULL); + + max = min = coords; + + for (i = 1; i < 4; ++i) + { + evas_map_point_coord_get(map, i, &coords.x, &coords.y, NULL); + + if (coords.x < min.x) + min.x = coords.x; + else if (coords.x > max.x) + max.x = coords.x; + + if (coords.y < min.y) + min.y = coords.y; + else if (coords.y > max.y) + max.y = coords.y; + } + + evas_damage_rectangle_add(evas_object_evas_get(obj), + min.x, min.y, + max.x - min.x, max.y - min.y); +} + + + static void _elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) { @@ -189,6 +229,11 @@ _elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) if (state->map) evas_object_map_set(obj, state->map); + //TODO: Remove! + //Since evas map have a afterimage bug for this time. + //This line is added temporary. + _obj_damage_area_set(obj); + } free(state); } -- 2.7.4