6 #define FNAME rect_blend_few_start
7 #define NAME "Rect Blend Few"
8 #define ICON "rect.png"
20 static Evas_Object *o_images[OBNUM];
23 static void _setup(void)
28 for (i = 0; i < OBNUM; i++)
32 o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
35 r = ((rnd()&0xff) * a) / 255;
36 g = ((rnd()&0xff) * a) / 255;
37 b = ((rnd()&0xff) * a) / 255;
38 efl_gfx_color_set(o, r, g, b, a);
39 efl_gfx_entity_visible_set(o, EINA_TRUE);
45 static void _cleanup(void)
48 for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
51 /* loop - do things */
52 static void _loop(double t, int f)
55 Evas_Coord x, y, w, h, w0, h0;
56 for (i = 0; i < OBNUM; i++)
60 w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
61 h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
62 x = (win_w / 2) - (w / 2);
63 x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
64 y = (win_h / 2) - (h / 2);
65 y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
66 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
67 efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
72 /* prepend special key handlers if interactive (before STD) */
73 static void _key(const char *key)
89 /* template stuff - ignore */
94 _ui_menu_item_add(ICON, NAME, FNAME);
106 ui_func_set(_key, _loop);