From 44de6c5b7b8269ee3ec50b0860c54f49322dbf1e Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 27 Dec 2019 13:50:25 +0900 Subject: [PATCH] text_style_different_string: increase a factor to update animation properly. --- src/bin/text_styles_different_strings.c | 6 ++++-- 1 file 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) /* loop - do things */ static void _loop(double t, int f) { + static int k = 0; int i; Evas_Coord x, y, w, h; for (i = 0; i < OBNUM; i++) { eo_do(o_texts[i], evas_obj_size_get(&w, &h)); x = (win_w / 2) - (w / 2); - x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2); y = (win_h / 2) - (h / 2); - y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); + y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (w / 2); eo_do(o_texts[i], evas_obj_position_set(x, y)); } + ++k; FPS_STD(NAME); }