summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-27 13:50:25 +0900
committerCedric BAIL <cedric@ddlm.me>2019-12-27 11:19:39 -0800
commit44de6c5b7b8269ee3ec50b0860c54f49322dbf1e (patch)
tree55c158cbccb7b805f9e9c960965c47c83af08464
parent75a808e226901b6d4112b1172e72f3624956208f (diff)
text_style_different_string: increase a factor to update animation properly.devs/cedric/efl-1.8
-rw-r--r--src/bin/text_styles_different_strings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/text_styles_different_strings.c b/src/bin/text_styles_different_strings.c
index a4cc58b..6d48b46 100644
--- a/src/bin/text_styles_different_strings.c
+++ b/src/bin/text_styles_different_strings.c
@@ -66,17 +66,19 @@ static void _cleanup(void)
66/* loop - do things */ 66/* loop - do things */
67static void _loop(double t, int f) 67static void _loop(double t, int f)
68{ 68{
69 static int k = 0;
69 int i; 70 int i;
70 Evas_Coord x, y, w, h; 71 Evas_Coord x, y, w, h;
71 for (i = 0; i < OBNUM; i++) 72 for (i = 0; i < OBNUM; i++)
72 { 73 {
73 eo_do(o_texts[i], evas_obj_size_get(&w, &h)); 74 eo_do(o_texts[i], evas_obj_size_get(&w, &h));
74 x = (win_w / 2) - (w / 2); 75 x = (win_w / 2) - (w / 2);
75 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); 76 x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
76 y = (win_h / 2) - (h / 2); 77 y = (win_h / 2) - (h / 2);
77 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); 78 y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (w / 2);
78 eo_do(o_texts[i], evas_obj_position_set(x, y)); 79 eo_do(o_texts[i], evas_obj_position_set(x, y));
79 } 80 }
81 ++k;
80 FPS_STD(NAME); 82 FPS_STD(NAME);
81} 83}
82 84