6 #define FNAME image_map_color_rotate_start
7 #define NAME "Image Map Color Rotate"
18 static Evas_Object *o_images[OBNUM];
21 static void _setup(void)
25 for (i = 0; i < (OBNUM / 2); i++)
27 o = eo_add(EVAS_IMAGE_CLASS, evas);
30 efl_file_set(build_path("logo.png"), NULL),
31 efl_gfx_fill_set(0, 0, 120, 160),
32 efl_gfx_size_set(120, 160),
33 efl_gfx_visible_set(EINA_TRUE));
39 static void _cleanup(void)
42 for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]);
45 /* loop - do things */
46 static void _loop(double t, int f)
49 static Evas_Map *m = NULL;
50 Evas_Coord x, y, w, h;
51 if (!m) m = evas_map_new(4);
52 for (i = 0; i < (OBNUM / 2); i++)
56 x = (win_w / 2) - (w / 2);
57 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
58 y = (win_h / 2) - (h / 2);
59 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
61 evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
63 evas_map_point_color_set(m, 0, 255, 255, 255, 255);
64 evas_map_point_color_set(m, 1, 255, 0, 0, 255);
65 evas_map_point_color_set(m, 2, 0, 0, 255, 255);
66 evas_map_point_color_set(m, 3, 0, 255, 0, 255);
68 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
71 evas_obj_map_enable_set(1),
77 /* prepend special key handlers if interactive (before STD) */
78 static void _key(char *key)
94 /* template stuff - ignore */
99 _ui_menu_item_add(ICON, NAME, FNAME);
111 ui_func_set(_key, _loop);