summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-05 15:58:10 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-05 15:58:10 -0500
commit389f810457c74621a2646b4fc5f315a73eddd2fd (patch)
treec693cf8551cd484a6ea7ef69a287e3ea5f81adaf
parente0fc03af77e92f3a5b54d4b4366db1a754288072 (diff)
use more accurate checks to compare animator timeline values
boolean != with doubles is bad
-rw-r--r--src/lib/efx_fade.c2
-rw-r--r--src/lib/efx_move.c4
-rw-r--r--src/lib/efx_pan.c2
-rw-r--r--src/lib/efx_resize.c2
-rw-r--r--src/lib/efx_rotate.c2
-rw-r--r--src/lib/efx_zoom.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/efx_fade.c b/src/lib/efx_fade.c
index 481fe6e..143b1e1 100644
--- a/src/lib/efx_fade.c
+++ b/src/lib/efx_fade.c
@@ -54,7 +54,7 @@ _fade_cb(Efx_Fade_Data *efd, double pos)
54 double factor; 54 double factor;
55 unsigned char r, g, b, a; 55 unsigned char r, g, b, a;
56 56
57 if (pos != 1.0) 57 if (pos < 1.0)
58 { 58 {
59 r = efd->start.r; 59 r = efd->start.r;
60 g = efd->start.g; 60 g = efd->start.g;
diff --git a/src/lib/efx_move.c b/src/lib/efx_move.c
index 4c3af80..9f2992d 100644
--- a/src/lib/efx_move.c
+++ b/src/lib/efx_move.c
@@ -63,7 +63,7 @@ _move_circle_cb(Efx_Move_Data *emd, double pos)
63 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL); 63 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL);
64 } 64 }
65 65
66 if (pos != 1.0) return EINA_TRUE; 66 if (pos < 1.0) return EINA_TRUE;
67 67
68 EFX_QUEUE_CHECK(emd); 68 EFX_QUEUE_CHECK(emd);
69 return EINA_TRUE; 69 return EINA_TRUE;
@@ -90,7 +90,7 @@ _move_cb(Efx_Move_Data *emd, double pos)
90 90
91 emd->current.x += x; 91 emd->current.x += x;
92 emd->current.y += y; 92 emd->current.y += y;
93 if (pos != 1.0) return EINA_TRUE; 93 if (pos < 1.0) return EINA_TRUE;
94 94
95 emd->anim = NULL; 95 emd->anim = NULL;
96 EFX_QUEUE_CHECK(emd); 96 EFX_QUEUE_CHECK(emd);
diff --git a/src/lib/efx_pan.c b/src/lib/efx_pan.c
index 8c935b1..0fef22d 100644
--- a/src/lib/efx_pan.c
+++ b/src/lib/efx_pan.c
@@ -315,7 +315,7 @@ _pan_cb(Efx_Pan_Data *epd, double pos)
315 315
316 epd->current.x += x; 316 epd->current.x += x;
317 epd->current.y += y; 317 epd->current.y += y;
318 if (pos != 1.0) return EINA_TRUE; 318 if (pos < 1.0) return EINA_TRUE;
319 319
320 epd->anim = NULL; 320 epd->anim = NULL;
321 EFX_QUEUE_CHECK(epd); 321 EFX_QUEUE_CHECK(epd);
diff --git a/src/lib/efx_resize.c b/src/lib/efx_resize.c
index 157a886..427055e 100644
--- a/src/lib/efx_resize.c
+++ b/src/lib/efx_resize.c
@@ -28,7 +28,7 @@ _resize_cb(Efx_Resize_Data *erd, double pos)
28{ 28{
29 double factor; 29 double factor;
30 30
31 if (pos != 1.0) 31 if (pos < 1.0)
32 { 32 {
33 factor = ecore_animator_pos_map(pos, erd->speed, 0, 0); 33 factor = ecore_animator_pos_map(pos, erd->speed, 0, 0);
34 evas_object_resize(erd->e->obj, lround(factor * (erd->w - erd->start_w)) + erd->start_w, lround(factor * (erd->h - erd->start_h)) + erd->start_h); 34 evas_object_resize(erd->e->obj, lround(factor * (erd->w - erd->start_w)) + erd->start_w, lround(factor * (erd->h - erd->start_h)) + erd->start_h);
diff --git a/src/lib/efx_rotate.c b/src/lib/efx_rotate.c
index e137a3f..3e22768 100644
--- a/src/lib/efx_rotate.c
+++ b/src/lib/efx_rotate.c
@@ -34,7 +34,7 @@ _rotate_cb(Efx_Rotate_Data *erd, double pos)
34 EINA_LIST_FOREACH(erd->e->followers, l, e) 34 EINA_LIST_FOREACH(erd->e->followers, l, e)
35 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL); 35 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL);
36 36
37 if (pos != 1.0) return EINA_TRUE; 37 if (pos < 1.0) return EINA_TRUE;
38 38
39 erd->anim = NULL; 39 erd->anim = NULL;
40 EFX_QUEUE_CHECK(erd); 40 EFX_QUEUE_CHECK(erd);
diff --git a/src/lib/efx_zoom.c b/src/lib/efx_zoom.c
index b51cc83..4cdfad1 100644
--- a/src/lib/efx_zoom.c
+++ b/src/lib/efx_zoom.c
@@ -65,7 +65,7 @@ _zoom_cb(Efx_Zoom_Data *ezd, double pos)
65 EINA_LIST_FOREACH(ezd->e->followers, l, e) 65 EINA_LIST_FOREACH(ezd->e->followers, l, e)
66 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL); 66 efx_maps_apply(e, e->obj, NULL, EFX_MAPS_APPLY_ALL);
67 67
68 if (pos != 1.0) return EINA_TRUE; 68 if (pos < 1.0) return EINA_TRUE;
69 69
70 ezd->anim = NULL; 70 ezd->anim = NULL;
71 EFX_QUEUE_CHECK(ezd); 71 EFX_QUEUE_CHECK(ezd);