hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=60214e6a172e42303fdfc69ef3d1996b25132242
commit 60214e6a172e42303fdfc69ef3d1996b25132242 Author: Jaehyun Cho <jae_hyun....@samsung.com> Date: Tue Dec 23 09:36:37 2014 +0900 elm_transit: Support zoom keeping current map effect. Summary: Support zoom keeping current map effect. Reviewers: Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D1805 --- src/lib/elm_transit.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c index 784aca2..d516ca3 100644 --- a/src/lib/elm_transit.c +++ b/src/lib/elm_transit.c @@ -1093,27 +1093,48 @@ _transit_effect_zoom_op(Elm_Transit_Effect *effect, Elm_Transit *transit , doubl Evas_Object *obj; Eina_List *elist; Elm_Transit_Effect_Zoom *zoom = effect; - Evas_Map *map; + Elm_Transit_Obj_Data *obj_data; + Evas_Map *map, *base_map; Evas_Coord x, y, w, h; - - map = evas_map_new(4); - if (!map) return; - - evas_map_util_object_move_sync_set(map, EINA_TRUE); + Evas_Coord mx, my, mz; + int i, point_cnt; EINA_LIST_FOREACH(transit->objs, elist, obj) { + mz = zoom->from + (progress * zoom->to); + + obj_data = evas_object_data_get(obj, _transit_key); + if (obj_data->state->map_enabled) + { + base_map = obj_data->state->map; + if (!base_map) return; + map = evas_map_dup(base_map); + if (!map) return; + point_cnt = evas_map_count_get(map); + for (i = 0; i < point_cnt; i++) + { + evas_map_point_coord_get(base_map, i, &mx, &my, NULL); + evas_map_point_coord_set(map, i, mx, my, mz); + } + } + else + { + map = evas_map_new(4); + if (!map) return; + evas_map_util_points_populate_from_object_full(map, obj, mz); + } + evas_map_util_object_move_sync_set(map, EINA_TRUE); + evas_object_geometry_get(obj, &x, &y, &w, &h); - evas_map_util_points_populate_from_object_full(map, obj, zoom->from + - (progress * zoom->to)); _recover_image_uv(obj, map, EINA_FALSE, EINA_FALSE); evas_map_util_3d_perspective(map, x + (w / 2), y + (h / 2), 0, _TRANSIT_FOCAL); if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE); evas_object_map_set(obj, map); evas_object_map_enable_set(obj, EINA_TRUE); + + evas_map_free(map); } - evas_map_free(map); } static Elm_Transit_Effect * --