6 #define FNAME image_crossfade_start
7 #define NAME "Image Crossfade"
8 #define ICON "blend.png"
18 static Evas_Object *o_images[2];
21 static void _setup(void)
25 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
27 efl_file_simple_load(o, build_path("im1.png"), NULL);
28 efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
29 efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
30 efl_gfx_entity_visible_set(o, EINA_TRUE);
32 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
34 efl_file_simple_load(o, build_path("im2.png"), NULL);
35 efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
36 efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
37 efl_gfx_entity_visible_set(o, EINA_TRUE);
43 static void _cleanup(void)
46 for (i = 0; i < 2; i++) efl_del(o_images[i]);
49 /* loop - do things */
50 static void _loop(double t, int f)
55 a = ((a << 3) | (a >> 2)) & 0xff;
56 efl_gfx_color_set(o_images[1], a, a, a, a);
60 /* prepend special key handlers if interactive (before STD) */
61 static void _key(const char *key)
77 /* template stuff - ignore */
82 _ui_menu_item_add(ICON, NAME, FNAME);
93 ui_func_set(_key, _loop, _setup);