summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-27 13:50:25 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-27 13:50:25 +0900
commitaee23715a29cb9f0b375e1b33762373d529b9c34 (patch)
treed63c84b4720e187f86ae6f6c4c060a2b9234049e
parent7dca83b4e53788dfed257c9a9b03b4b1c10fa1b4 (diff)
text_style_different_string: increase a factor to update animation properly.
-rw-r--r--src/bin/text_styles_different_strings.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/text_styles_different_strings.c b/src/bin/text_styles_different_strings.c
index e5cf355..02a2507 100644
--- a/src/bin/text_styles_different_strings.c
+++ b/src/bin/text_styles_different_strings.c
@@ -67,17 +67,19 @@ static void _cleanup(void)
67/* loop - do things */ 67/* loop - do things */
68static void _loop(double t, int f) 68static void _loop(double t, int f)
69{ 69{
70 static int k = 0;
70 int i; 71 int i;
71 Evas_Coord x, y, w, h; 72 Evas_Coord x, y, w, h;
72 for (i = 0; i < OBNUM; i++) 73 for (i = 0; i < OBNUM; i++)
73 { 74 {
74 exp_size_get(o_texts[i], &w, &h); 75 exp_size_get(o_texts[i], &w, &h);
75 x = (win_w / 2) - (w / 2); 76 x = (win_w / 2) - (w / 2);
76 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); 77 x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
77 y = (win_h / 2) - (h / 2); 78 y = (win_h / 2) - (h / 2);
78 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); 79 y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (w / 2);
79 efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y)); 80 efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
80 } 81 }
82 ++k;
81 FPS_STD(NAME); 83 FPS_STD(NAME);
82} 84}
83 85