From: Daniel Juyung Seo Date: Tue, 29 Oct 2013 23:49:09 +0000 (+0900) Subject: test_image.c: enhance image click example to look better. X-Git-Tag: upstream/1.20.0~7116^2~14^2~3896 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=344c792f862d299237bfa162e69672f065980a27;p=platform%2Fupstream%2Fefl.git test_image.c: enhance image click example to look better. - Keep the final state. - Rotate according to the final state. --- diff --git a/legacy/elementary/src/bin/test_image.c b/legacy/elementary/src/bin/test_image.c index 3119462..37875ab 100755 --- a/legacy/elementary/src/bin/test_image.c +++ b/legacy/elementary/src/bin/test_image.c @@ -137,13 +137,24 @@ static void _img_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { Elm_Transit *trans; + static int degree = 0; fprintf(stderr, "%p - clicked\n", obj); trans = elm_transit_add(); elm_transit_object_add(trans, data); - elm_transit_effect_rotation_add(trans, 0, 180); - elm_transit_duration_set(trans, 5.0); + if (degree == 0) + { + elm_transit_effect_rotation_add(trans, 0, 180); + degree = 180; + } + else + { + elm_transit_effect_rotation_add(trans, 180, 360); + degree = 0; + } + elm_transit_duration_set(trans, 3.0); + elm_transit_objects_final_state_keep_set(trans, EINA_TRUE); elm_transit_go(trans); }