summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/cxx/image_map_nearest_rotate.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/bin/cxx/image_map_nearest_rotate.cc b/src/bin/cxx/image_map_nearest_rotate.cc
index 8c6bb1f..1c4e62f 100644
--- a/src/bin/cxx/image_map_nearest_rotate.cc
+++ b/src/bin/cxx/image_map_nearest_rotate.cc
@@ -49,27 +49,30 @@ static void _cleanup(void)
49/* loop - do things */ 49/* loop - do things */
50static void _loop(double t, int f) 50static void _loop(double t, int f)
51{ 51{
52 Evas_Coord x, y, w, h;
52 static Evas_Map *m = NULL; 53 static Evas_Map *m = NULL;
53 if (!m) m = evas_map_new(4); 54 if (!m) m = evas_map_new(4);
54 evas_map_smooth_set(m, 0); 55 evas_map_smooth_set(m, 0);
55 int i = 0; 56 int i = 0;
56 for (evas::image& img : images) 57 for (evas::image& img : images)
57 { 58 {
58 Evas_Coord w = 120; 59 w = 120;
59 Evas_Coord h = 160; 60 h = 160;
60 Evas_Coord x = (win_w / 2) - (w / 2); 61 x = (win_w / 2) - (w / 2);
61 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); 62 x += ::sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
62 Evas_Coord y = (win_h / 2) - (h / 2); 63 y = (win_h / 2) - (h / 2);
63 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); 64 y += ::cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
64 65
65 evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); 66 ::evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
66 67
67 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); 68 ::evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
68 69
69 img.map_enable_set(1); 70 img.map_enable_set(1);
70 img.map_set(m); 71 img.map_set(m);
71 ++i; 72 ++i;
72 } 73 }
74 std::cout << "XXX << " << __FILE__ << ":"<< __LINE__ << " >> " << __FUNCTION__ << "() :: i = " << i << std::flush << std::endl;
75
73 FPS_STD(NAME); 76 FPS_STD(NAME);
74} 77}
75 78