summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-10-30 15:30:18 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-11-04 13:06:53 +0100
commite2a011f56b48d7894e710fca5a46a4bfe87ecd1f (patch)
tree73996bee5029fd84706c4356de6c6fb433bebd4d
parent92a4fab5d79f69dfea118f65f494bb014117b4f2 (diff)
efl_canvas_animation_scale: move from 2 doubles to vectors
Summary: with this the passing of positions is getting more easy. Additionally, Reading the API call gets easier, as parameters are semantically grouped. Depends on D10558 Reviewers: segfaultxavi, Jaehyun_Cho Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10559
-rw-r--r--src/bin/elementary/test_efl_anim_group_parallel.c4
-rw-r--r--src/bin/elementary/test_efl_anim_group_sequential.c4
-rw-r--r--src/bin/elementary/test_efl_anim_scale.c12
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_scale.c134
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_scale.eo20
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_scale_private.h18
6 files changed, 64 insertions, 128 deletions
diff --git a/src/bin/elementary/test_efl_anim_group_parallel.c b/src/bin/elementary/test_efl_anim_group_parallel.c
index ec4c3eabea..262286a6fb 100644
--- a/src/bin/elementary/test_efl_anim_group_parallel.c
+++ b/src/bin/elementary/test_efl_anim_group_parallel.c
@@ -94,7 +94,7 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
94 94
95 //Scale Animation to zoom out 95 //Scale Animation to zoom out
96 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 96 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
97 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 97 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
98 98
99 //Show Parallel Group Animation 99 //Show Parallel Group Animation
100 Efl_Canvas_Animation *parallel_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win); 100 Efl_Canvas_Animation *parallel_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win);
@@ -117,7 +117,7 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
117 117
118 //Scale Animation to zoom in 118 //Scale Animation to zoom in
119 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 119 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
120 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 120 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
121 121
122 //Hide Parallel Group Animation 122 //Hide Parallel Group Animation
123 Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win); 123 Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win);
diff --git a/src/bin/elementary/test_efl_anim_group_sequential.c b/src/bin/elementary/test_efl_anim_group_sequential.c
index 2d09354675..4beefb2f55 100644
--- a/src/bin/elementary/test_efl_anim_group_sequential.c
+++ b/src/bin/elementary/test_efl_anim_group_sequential.c
@@ -90,7 +90,7 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
90 90
91 //Scale Animation to zoom in 91 //Scale Animation to zoom in
92 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 92 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
93 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 93 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
94 94
95 //Hide Animation 95 //Hide Animation
96 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 96 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
@@ -115,7 +115,7 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
115 115
116 //Scale Animation to zoom out 116 //Scale Animation to zoom out
117 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 117 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
118 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 118 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
119 efl_animation_duration_set(scale_half_anim, 1.0); 119 efl_animation_duration_set(scale_half_anim, 1.0);
120 120
121 //Rotate from 45 to 0 degrees Animation 121 //Rotate from 45 to 0 degrees Animation
diff --git a/src/bin/elementary/test_efl_anim_scale.c b/src/bin/elementary/test_efl_anim_scale.c
index 5e5f9abc58..d3812dec67 100644
--- a/src/bin/elementary/test_efl_anim_scale.c
+++ b/src/bin/elementary/test_efl_anim_scale.c
@@ -84,13 +84,13 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
84 84
85 //Scale Animation to zoom in 85 //Scale Animation to zoom in
86 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 86 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
87 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 87 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
88 efl_animation_duration_set(scale_double_anim, 1.0); 88 efl_animation_duration_set(scale_double_anim, 1.0);
89 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 89 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
90 90
91 //Scale Animation to zoom out 91 //Scale Animation to zoom out
92 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 92 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
93 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 93 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
94 efl_animation_duration_set(scale_half_anim, 1.0); 94 efl_animation_duration_set(scale_half_anim, 1.0);
95 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 95 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
96 96
@@ -153,13 +153,13 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
153 153
154 //Scale Animation to zoom in 154 //Scale Animation to zoom in
155 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 155 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
156 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5); 156 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), pivot, EINA_VECTOR2(0.5, 0.5));
157 efl_animation_duration_set(scale_double_anim, 1.0); 157 efl_animation_duration_set(scale_double_anim, 1.0);
158 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 158 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
159 159
160 //Scale Animation to zoom out 160 //Scale Animation to zoom out
161 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 161 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
162 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5); 162 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), pivot, EINA_VECTOR2(0.5, 0.5));
163 efl_animation_duration_set(scale_half_anim, 1.0); 163 efl_animation_duration_set(scale_half_anim, 1.0);
164 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 164 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
165 165
@@ -219,13 +219,13 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
219 219
220 //Scale Animation to zoom in 220 //Scale Animation to zoom in
221 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 221 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
222 efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0); 222 efl_animation_scale_absolute_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), EINA_POSITION2D(0, 0));
223 efl_animation_duration_set(scale_double_anim, 1.0); 223 efl_animation_duration_set(scale_double_anim, 1.0);
224 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 224 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
225 225
226 //Scale Animation to zoom out 226 //Scale Animation to zoom out
227 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 227 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
228 efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0); 228 efl_animation_scale_absolute_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), EINA_POSITION2D(0, 0));
229 efl_animation_duration_set(scale_half_anim, 1.0); 229 efl_animation_duration_set(scale_half_anim, 1.0);
230 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 230 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
231 231
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.c b/src/lib/evas/canvas/efl_canvas_animation_scale.c
index 1cccbc61b5..e8a13233d6 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_scale.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_scale.c
@@ -5,37 +5,26 @@
5EOLIAN static void 5EOLIAN static void
6_efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED, 6_efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED,
7 Efl_Canvas_Animation_Scale_Data *pd, 7 Efl_Canvas_Animation_Scale_Data *pd,
8 double from_scale_x, 8 Eina_Vector2 from_scale,
9 double from_scale_y, 9 Eina_Vector2 to_scale,
10 double to_scale_x,
11 double to_scale_y,
12 Efl_Canvas_Object *pivot, 10 Efl_Canvas_Object *pivot,
13 double cx, 11 Eina_Vector2 rel_pivot_pos)
14 double cy)
15{ 12{
16 pd->from.scale_x = from_scale_x; 13 pd->from = from_scale;
17 pd->from.scale_y = from_scale_y;
18 14
19 pd->to.scale_x = to_scale_x; 15 pd->to = to_scale;
20 pd->to.scale_y = to_scale_y;
21 16
22 pd->rel_pivot.obj = pivot; 17 pd->rel_pivot.obj = pivot;
23 pd->rel_pivot.cx = cx; 18 pd->rel_pivot.pos = rel_pivot_pos;
24 pd->rel_pivot.cy = cy;
25 19
26 pd->use_rel_pivot = EINA_TRUE; 20 pd->use_rel_pivot = EINA_TRUE;
27} 21}
28 22
29EOLIAN static void 23EOLIAN static void
30_efl_canvas_animation_scale_scale_get(const Eo *eo_obj EINA_UNUSED, 24_efl_canvas_animation_scale_scale_get(const Eo *obj EINA_UNUSED,
31 Efl_Canvas_Animation_Scale_Data *pd, 25 Efl_Canvas_Animation_Scale_Data *pd,
32 double *from_scale_x, 26 Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
33 double *from_scale_y, 27 Efl_Canvas_Object **pivot, Eina_Vector2 *pivot_pos)
34 double *to_scale_x,
35 double *to_scale_y,
36 Efl_Canvas_Object **pivot,
37 double *cx,
38 double *cy)
39{ 28{
40 if (!pd->use_rel_pivot) 29 if (!pd->use_rel_pivot)
41 { 30 {
@@ -43,59 +32,39 @@ _efl_canvas_animation_scale_scale_get(const Eo *eo_obj EINA_UNUSED,
43 return; 32 return;
44 } 33 }
45 34
46 if (from_scale_x) 35 if (from_scale)
47 *from_scale_x = pd->from.scale_x; 36 *from_scale = pd->from;
48
49 if (from_scale_y)
50 *from_scale_y = pd->from.scale_y;
51
52 if (to_scale_x)
53 *to_scale_x = pd->to.scale_x;
54 37
55 if (to_scale_y) 38 if (to_scale)
56 *to_scale_y = pd->to.scale_y; 39 *to_scale = pd->to;
57 40
58 if (pivot) 41 if (pivot)
59 *pivot = pd->rel_pivot.obj; 42 *pivot = pd->rel_pivot.obj;
60 43
61 if (cx) 44 if (pivot_pos)
62 *cx = pd->rel_pivot.cx; 45 *pivot_pos = pd->rel_pivot.pos;
63
64 if (cy)
65 *cy = pd->rel_pivot.cy;
66} 46}
67 47
68EOLIAN static void 48EOLIAN static void
69_efl_canvas_animation_scale_scale_absolute_set(Eo *eo_obj EINA_UNUSED, 49_efl_canvas_animation_scale_scale_absolute_set(Eo *obj EINA_UNUSED,
70 Efl_Canvas_Animation_Scale_Data *pd, 50 Efl_Canvas_Animation_Scale_Data *pd,
71 double from_scale_x, 51 Eina_Vector2 from_scale, Eina_Vector2 to_scale,
72 double from_scale_y, 52 Eina_Position2D pos)
73 double to_scale_x,
74 double to_scale_y,
75 Evas_Coord cx,
76 Evas_Coord cy)
77{ 53{
78 pd->from.scale_x = from_scale_x; 54 pd->from = from_scale;
79 pd->from.scale_y = from_scale_y;
80 55
81 pd->to.scale_x = to_scale_x; 56 pd->to = to_scale;
82 pd->to.scale_y = to_scale_y;
83 57
84 pd->abs_pivot.cx = cx; 58 pd->pos = pos;
85 pd->abs_pivot.cy = cy;
86 59
87 pd->use_rel_pivot = EINA_FALSE; 60 pd->use_rel_pivot = EINA_FALSE;
88} 61}
89 62
90EOLIAN static void 63EOLIAN static void
91_efl_canvas_animation_scale_scale_absolute_get(const Eo *eo_obj EINA_UNUSED, 64_efl_canvas_animation_scale_scale_absolute_get(const Eo *obj EINA_UNUSED,
92 Efl_Canvas_Animation_Scale_Data *pd, 65 Efl_Canvas_Animation_Scale_Data *pd,
93 double *from_scale_x, 66 Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
94 double *from_scale_y, 67 Eina_Position2D *pos)
95 double *to_scale_x,
96 double *to_scale_y,
97 Evas_Coord *cx,
98 Evas_Coord *cy)
99{ 68{
100 if (pd->use_rel_pivot) 69 if (pd->use_rel_pivot)
101 { 70 {
@@ -103,23 +72,14 @@ _efl_canvas_animation_scale_scale_absolute_get(const Eo *eo_obj EINA_UNUSED,
103 return; 72 return;
104 } 73 }
105 74
106 if (from_scale_x) 75 if (from_scale)
107 *from_scale_x = pd->from.scale_x; 76 *from_scale = pd->from;
108
109 if (from_scale_y)
110 *from_scale_y = pd->from.scale_y;
111 77
112 if (to_scale_x) 78 if (to_scale)
113 *to_scale_x = pd->to.scale_x; 79 *to_scale = pd->to;
114 80
115 if (to_scale_y) 81 if (pos)
116 *to_scale_y = pd->to.scale_y; 82 *pos = pd->pos;
117
118 if (cx)
119 *cx = pd->abs_pivot.cx;
120
121 if (cy)
122 *cy = pd->abs_pivot.cy;
123} 83}
124 84
125EOLIAN static double 85EOLIAN static double
@@ -128,26 +88,26 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj,
128 double progress, 88 double progress,
129 Efl_Canvas_Object *target) 89 Efl_Canvas_Object *target)
130{ 90{
131 Efl_Canvas_Animation_Scale_Property new_scale; 91 Eina_Vector2 new_scale;
132 92
133 progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target); 93 progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target);
134 if (!target) return progress; 94 if (!target) return progress;
135 95
136 new_scale.scale_x = GET_STATUS(pd->from.scale_x, pd->to.scale_x, progress); 96 new_scale.x = GET_STATUS(pd->from.x, pd->to.x, progress);
137 new_scale.scale_y = GET_STATUS(pd->from.scale_y, pd->to.scale_y, progress); 97 new_scale.y = GET_STATUS(pd->from.y, pd->to.y, progress);
138 98
139 if (pd->use_rel_pivot) 99 if (pd->use_rel_pivot)
140 { 100 {
141 efl_gfx_mapping_zoom(target, 101 efl_gfx_mapping_zoom(target,
142 new_scale.scale_x, new_scale.scale_y, 102 new_scale.x, new_scale.y,
143 (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, 103 (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target,
144 pd->rel_pivot.cx, pd->rel_pivot.cy); 104 pd->rel_pivot.pos.x , pd->rel_pivot.pos.y);
145 } 105 }
146 else 106 else
147 { 107 {
148 efl_gfx_mapping_zoom_absolute(target, 108 efl_gfx_mapping_zoom_absolute(target,
149 new_scale.scale_x, new_scale.scale_y, 109 new_scale.x, new_scale.y,
150 pd->abs_pivot.cx, pd->abs_pivot.cy); 110 pd->pos.x, pd->pos.y);
151 } 111 }
152 112
153 return progress; 113 return progress;
@@ -159,17 +119,11 @@ _efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj,
159{ 119{
160 eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); 120 eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
161 121
162 pd->from.scale_x = 1.0; 122 pd->from = EINA_VECTOR2(1.0, 1.0);
163 pd->from.scale_y = 1.0; 123 pd->to = EINA_VECTOR2(1.0, 1.0);
164 pd->to.scale_x = 1.0; 124 pd->rel_pivot.pos = EINA_VECTOR2(0.5, 0.5);
165 pd->to.scale_y = 1.0;
166
167 pd->rel_pivot.obj = NULL; 125 pd->rel_pivot.obj = NULL;
168 pd->rel_pivot.cx = 0.5; 126 pd->pos = EINA_POSITION2D(0, 0);
169 pd->rel_pivot.cy = 0.5;
170
171 pd->abs_pivot.cx = 0;
172 pd->abs_pivot.cy = 0;
173 127
174 pd->use_rel_pivot = EINA_TRUE; 128 pd->use_rel_pivot = EINA_TRUE;
175 129
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.eo b/src/lib/evas/canvas/efl_canvas_animation_scale.eo
index 4d7df5e010..b35c5d819b 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_scale.eo
+++ b/src/lib/evas/canvas/efl_canvas_animation_scale.eo
@@ -11,16 +11,11 @@ class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
11 get { 11 get {
12 } 12 }
13 values { 13 values {
14 from_scale_x: double; [[Scale factor along x axis when animation starts]] 14 from_scale : Eina.Vector2; [[Scale factor when animation starts]]
15 from_scale_y: double; [[Scale factor along y axis when animation starts]] 15 to_scale : Eina.Vector2; [[Scale factor when animation ends]]
16 to_scale_x: double; [[Scale factor along x axis when animation ends]]
17 to_scale_y: double; [[Scale factor along y axis when animation ends]]
18 pivot: Efl.Canvas.Object; [[Pivot object for the center point. If the pivot object is $NULL, then the object 16 pivot: Efl.Canvas.Object; [[Pivot object for the center point. If the pivot object is $NULL, then the object
19 is scaled on itself.]] 17 is scaled on itself.]]
20 cx: double; [[X relative coordinate of the center point. The left end is 0.0 and the right end is 1.0 18 pivot_pos : Eina.Vector2; [[Relative coordinates of the center point. 0.0,0.0 is upper left.]]
21 (the center is 0.5).]]
22 cy: double; [[Y relative coordinate of the center point. The top end is 0.0 and the bottom end is 1.0
23 (the center is 0.5).]]
24 } 19 }
25 } 20 }
26 @property scale_absolute { 21 @property scale_absolute {
@@ -30,12 +25,9 @@ class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
30 get { 25 get {
31 } 26 }
32 values { 27 values {
33 from_scale_x: double; [[Scale factor along x axis when animation starts]] 28 from_scale : Eina.Vector2; [[Scale factor when animation starts]]
34 from_scale_y: double; [[Scale factor along y axis when animation starts]] 29 to_scale : Eina.Vector2; [[Scale factor when animation ends]]
35 to_scale_x: double; [[Scale factor along x axis when animation ends]] 30 pos : Eina.Position2D; [[Absolut coordinates in canvas space]]
36 to_scale_y: double; [[Scale factor along y axis when animation ends]]
37 cx: int; [[X absolute coordinate of the center point.]]
38 cy: int; [[Y absolute coordinate of the center point.]]
39 } 31 }
40 } 32 }
41 } 33 }
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale_private.h b/src/lib/evas/canvas/efl_canvas_animation_scale_private.h
index 020d9fdcb3..57dc40d725 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_scale_private.h
+++ b/src/lib/evas/canvas/efl_canvas_animation_scale_private.h
@@ -7,28 +7,18 @@
7#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \ 7#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \
8 Efl_Canvas_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_SCALE_CLASS) 8 Efl_Canvas_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_SCALE_CLASS)
9 9
10typedef struct _Efl_Canvas_Animation_Scale_Property
11{
12 double scale_x, scale_y;
13} Efl_Canvas_Animation_Scale_Property;
14
15typedef struct _Efl_Canvas_Animation_Scale_Absolute_Pivot
16{
17 Evas_Coord cx, cy;
18} Efl_Canvas_Animation_Scale_Absolute_Pivot;
19
20typedef struct _Efl_Canvas_Animation_Scale_Relative_Pivot 10typedef struct _Efl_Canvas_Animation_Scale_Relative_Pivot
21{ 11{
22 Efl_Canvas_Object *obj; 12 Efl_Canvas_Object *obj;
23 double cx, cy; 13 Eina_Vector2 pos;
24} Efl_Canvas_Animation_Scale_Relative_Pivot; 14} Efl_Canvas_Animation_Scale_Relative_Pivot;
25 15
26typedef struct _Efl_Canvas_Animation_Scale_Data 16typedef struct _Efl_Canvas_Animation_Scale_Data
27{ 17{
28 Efl_Canvas_Animation_Scale_Property from; 18 Eina_Vector2 from;
29 Efl_Canvas_Animation_Scale_Property to; 19 Eina_Vector2 to;
30 20
31 Efl_Canvas_Animation_Scale_Absolute_Pivot abs_pivot; 21 Eina_Position2D pos;
32 Efl_Canvas_Animation_Scale_Relative_Pivot rel_pivot; 22 Efl_Canvas_Animation_Scale_Relative_Pivot rel_pivot;
33 23
34 Eina_Bool use_rel_pivot; 24 Eina_Bool use_rel_pivot;