6 #define FNAME rect_blend_pow2_start
7 #define NAME "Rect Blend Power 2"
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);
31 a = 256 - (1 << ((rnd() % 8) + 1));
33 r = ((rnd()&0xff) * a) / 255;
34 g = ((rnd()&0xff) * a) / 255;
35 b = ((rnd()&0xff) * a) / 255;
36 efl_gfx_color_set(o, r, g, b, a);
37 efl_gfx_entity_visible_set(o, EINA_TRUE);
43 static void _cleanup(void)
46 for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
49 /* loop - do things */
50 static void _loop(double t, int f)
53 Evas_Coord x, y, w, h, w0, h0;
54 for (i = 0; i < OBNUM; i++)
58 w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2);
59 h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2);
60 x = (win_w / 2) - (w / 2);
61 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
62 y = (win_h / 2) - (h / 2);
63 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
64 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
65 efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
70 /* prepend special key handlers if interactive (before STD) */
71 static void _key(const char *key)
87 /* template stuff - ignore */
92 _ui_menu_item_add(ICON, NAME, FNAME);
103 ui_func_set(_key, _loop, _setup);