6 #define FNAME rect_blend_start
7 #define NAME "Rect Blend"
8 #define ICON "rect.png"
17 static Evas_Object *o_images[OBNUM];
20 static void _setup(void)
25 for (i = 0; i < OBNUM; i++)
29 o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
32 r = ((rnd()&0xff) * a) / 255;
33 g = ((rnd()&0xff) * a) / 255;
34 b = ((rnd()&0xff) * a) / 255;
35 efl_gfx_color_set(o, r, g, b, a);
36 efl_gfx_entity_visible_set(o, EINA_TRUE);
42 static void _cleanup(void)
45 for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
48 /* loop - do things */
49 static void _loop(double t, int f)
52 Evas_Coord x, y, w, h, w0, h0;
53 for (i = 0; i < OBNUM; i++)
57 w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
58 h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
59 x = (win_w / 2) - (w / 2);
60 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
61 y = (win_h / 2) - (h / 2);
62 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
63 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
64 efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
69 /* prepend special key handlers if interactive (before STD) */
70 static void _key(const char *key)
86 /* template stuff - ignore */
91 _ui_menu_item_add(ICON, NAME, FNAME);
102 ui_func_set(_key, _loop, _setup);