6 #define FNAME image_blend_border_start
7 #define NAME "Image Blend Border"
8 #define ICON "blend.png"
17 static Evas_Object *o_images[OBNUM];
20 static void _setup(void)
24 for (i = 0; i < OBNUM; i++)
26 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
28 efl_file_simple_load(o, build_path("bar.png"), NULL);
29 efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
30 efl_gfx_entity_visible_set(o, EINA_TRUE);
36 static void _cleanup(void)
39 for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
42 /* loop - do things */
43 static void _loop(double t, int f)
46 Evas_Coord x, y, w, h, w0, h0;
47 for (i = 0; i < OBNUM; i++)
51 w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
52 h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
53 x = (win_w / 2) - (w / 2);
54 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
55 y = (win_h / 2) - (h / 2);
56 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
57 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
58 efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
59 efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
64 /* prepend special key handlers if interactive (before STD) */
65 static void _key(const char *key)
81 /* template stuff - ignore */
86 _ui_menu_item_add(ICON, NAME, FNAME);
98 ui_func_set(_key, _loop);