summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:38:07 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:38:07 +0200
commit990c088f6b7833b3052b90a5b5aec3de4f44ddd2 (patch)
treeae66259bc087917bb2d61fa2eafb38ee2141c90f
parent65fb92831b8572b41b8b5c50ebc2e8586ed2140b (diff)
evas: align naming with ector, use bounds.
-rw-r--r--src/lib/evas/canvas/efl_vg_base.eo5
-rw-r--r--src/lib/evas/canvas/efl_vg_container.eo2
-rw-r--r--src/lib/evas/canvas/efl_vg_gradient_linear.eo2
-rw-r--r--src/lib/evas/canvas/efl_vg_gradient_radial.eo2
-rw-r--r--src/lib/evas/canvas/efl_vg_shape.eo2
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c12
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c5
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_radial.c5
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c18
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c5
10 files changed, 25 insertions, 33 deletions
diff --git a/src/lib/evas/canvas/efl_vg_base.eo b/src/lib/evas/canvas/efl_vg_base.eo
index e522b5d..e542567 100644
--- a/src/lib/evas/canvas/efl_vg_base.eo
+++ b/src/lib/evas/canvas/efl_vg_base.eo
@@ -59,14 +59,13 @@ abstract Efl.VG.Base (Eo.Base, Efl.Gfx.Base, Efl.Gfx.Stack)
59 } */ 59 } */
60 } 60 }
61 methods { 61 methods {
62 bound_get { 62 bounds_get {
63 /*@ 63 /*@
64 Give the bounding box in screen coordinate as being drawn. 64 Give the bounding box in screen coordinate as being drawn.
65 It will start as the control box until it is refined once the shape 65 It will start as the control box until it is refined once the shape
66 is computed. 66 is computed.
67 @since 1.14 67 @since 1.14
68 */ 68 */
69 return: bool @warn_unused;
70 params { 69 params {
71 @out Eina_Rectangle r; /*@ bounding box to be returned */ 70 @out Eina_Rectangle r; /*@ bounding box to be returned */
72 } 71 }
@@ -90,6 +89,6 @@ abstract Efl.VG.Base (Eo.Base, Efl.Gfx.Base, Efl.Gfx.Stack)
90 Efl.Gfx.Stack.stack_above; 89 Efl.Gfx.Stack.stack_above;
91 Efl.Gfx.Stack.raise; 90 Efl.Gfx.Stack.raise;
92 Efl.Gfx.Stack.lower; 91 Efl.Gfx.Stack.lower;
93 @virtual .bound_get; 92 @virtual .bounds_get;
94 } 93 }
95} \ No newline at end of file 94} \ No newline at end of file
diff --git a/src/lib/evas/canvas/efl_vg_container.eo b/src/lib/evas/canvas/efl_vg_container.eo
index 4d8a085..0c954e2 100644
--- a/src/lib/evas/canvas/efl_vg_container.eo
+++ b/src/lib/evas/canvas/efl_vg_container.eo
@@ -4,6 +4,6 @@ class Efl.VG.Container (Efl.VG.Base)
4 implements { 4 implements {
5 Eo.Base.constructor; 5 Eo.Base.constructor;
6 Eo.Base.destructor; 6 Eo.Base.destructor;
7 Efl.VG.Base.bound_get; 7 Efl.VG.Base.bounds_get;
8 } 8 }
9} 9}
diff --git a/src/lib/evas/canvas/efl_vg_gradient_linear.eo b/src/lib/evas/canvas/efl_vg_gradient_linear.eo
index 8e32309..4aaddd4 100644
--- a/src/lib/evas/canvas/efl_vg_gradient_linear.eo
+++ b/src/lib/evas/canvas/efl_vg_gradient_linear.eo
@@ -6,7 +6,7 @@ class Efl.VG.Gradient_Linear (Efl.VG.Gradient, Efl.Gfx.Gradient.Linear)
6 Efl.Gfx.Gradient.Linear.start.get; 6 Efl.Gfx.Gradient.Linear.start.get;
7 Efl.Gfx.Gradient.Linear.end.set; 7 Efl.Gfx.Gradient.Linear.end.set;
8 Efl.Gfx.Gradient.Linear.end.get; 8 Efl.Gfx.Gradient.Linear.end.get;
9 Efl.VG.Base.bound_get; 9 Efl.VG.Base.bounds_get;
10 Eo.Base.constructor; 10 Eo.Base.constructor;
11 Eo.Base.destructor; 11 Eo.Base.destructor;
12 } 12 }
diff --git a/src/lib/evas/canvas/efl_vg_gradient_radial.eo b/src/lib/evas/canvas/efl_vg_gradient_radial.eo
index acf0d3b..62eb086 100644
--- a/src/lib/evas/canvas/efl_vg_gradient_radial.eo
+++ b/src/lib/evas/canvas/efl_vg_gradient_radial.eo
@@ -8,7 +8,7 @@ class Efl.VG.Gradient_Radial (Efl.VG.Gradient, Efl.Gfx.Gradient.Radial)
8 Efl.Gfx.Gradient.Radial.radius.get; 8 Efl.Gfx.Gradient.Radial.radius.get;
9 Efl.Gfx.Gradient.Radial.focal.set; 9 Efl.Gfx.Gradient.Radial.focal.set;
10 Efl.Gfx.Gradient.Radial.focal.get; 10 Efl.Gfx.Gradient.Radial.focal.get;
11 Efl.VG.Base.bound_get; 11 Efl.VG.Base.bounds_get;
12 Eo.Base.constructor; 12 Eo.Base.constructor;
13 Eo.Base.destructor; 13 Eo.Base.destructor;
14 } 14 }
diff --git a/src/lib/evas/canvas/efl_vg_shape.eo b/src/lib/evas/canvas/efl_vg_shape.eo
index ab6468c..ee43e83 100644
--- a/src/lib/evas/canvas/efl_vg_shape.eo
+++ b/src/lib/evas/canvas/efl_vg_shape.eo
@@ -40,7 +40,7 @@ class Efl.VG.Shape (Efl.VG.Base, Efl.Gfx.Shape)
40 Efl.Gfx.Shape.stroke_join; 40 Efl.Gfx.Shape.stroke_join;
41 Efl.Gfx.Base.color_part.set; 41 Efl.Gfx.Base.color_part.set;
42 Efl.Gfx.Base.color_part.get; 42 Efl.Gfx.Base.color_part.get;
43 Efl.VG.Base.bound_get; 43 Efl.VG.Base.bounds_get;
44 Eo.Base.constructor; 44 Eo.Base.constructor;
45 Eo.Base.destructor; 45 Eo.Base.destructor;
46 } 46 }
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 5b5d60e..ba0eeec 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -45,8 +45,8 @@ _efl_vg_container_eo_base_destructor(Eo *obj,
45 eo_do_super(obj, MY_CLASS, eo_destructor()); 45 eo_do_super(obj, MY_CLASS, eo_destructor());
46} 46}
47 47
48static Eina_Bool 48static void
49_efl_vg_container_efl_vg_base_bound_get(Eo *obj EINA_UNUSED, 49_efl_vg_container_efl_vg_base_bounds_get(Eo *obj EINA_UNUSED,
50 Efl_VG_Container_Data *pd, 50 Efl_VG_Container_Data *pd,
51 Eina_Rectangle *r) 51 Eina_Rectangle *r)
52{ 52{
@@ -55,25 +55,21 @@ _efl_vg_container_efl_vg_base_bound_get(Eo *obj EINA_UNUSED,
55 Eina_List *l; 55 Eina_List *l;
56 Eo *child; 56 Eo *child;
57 57
58 if (!r) return EINA_FALSE;
59
60 EINA_RECTANGLE_SET(&s, -1, -1, 0, 0); 58 EINA_RECTANGLE_SET(&s, -1, -1, 0, 0);
61 59
62 EINA_LIST_FOREACH(pd->children, l, child) 60 EINA_LIST_FOREACH(pd->children, l, child)
63 { 61 {
64 if (first) 62 if (first)
65 { 63 {
66 eo_do(child, efl_vg_bound_get(r)); 64 eo_do(child, efl_vg_bounds_get(r));
67 first = EINA_FALSE; 65 first = EINA_FALSE;
68 } 66 }
69 else 67 else
70 { 68 {
71 eo_do(child, efl_vg_bound_get(&s)); 69 eo_do(child, efl_vg_bounds_get(&s));
72 eina_rectangle_union(r, &s); 70 eina_rectangle_union(r, &s);
73 } 71 }
74 } 72 }
75 // returning EINA_FALSE if no bouding box was found
76 return first ? EINA_FALSE : EINA_TRUE;
77} 73}
78 74
79EAPI Efl_VG* 75EAPI Efl_VG*
diff --git a/src/lib/evas/canvas/evas_vg_gradient_linear.c b/src/lib/evas/canvas/evas_vg_gradient_linear.c
index dee38f4..9f05fac 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_linear.c
@@ -107,8 +107,8 @@ _efl_vg_gradient_linear_eo_base_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data
107 eo_do_super(obj, MY_CLASS, eo_destructor()); 107 eo_do_super(obj, MY_CLASS, eo_destructor());
108} 108}
109 109
110static Eina_Bool 110static void
111_efl_vg_gradient_linear_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Linear_Data *pd, Eina_Rectangle *r) 111_efl_vg_gradient_linear_efl_vg_base_bounds_get(Eo *obj, Efl_VG_Gradient_Linear_Data *pd, Eina_Rectangle *r)
112{ 112{
113 Efl_VG_Base_Data *nd; 113 Efl_VG_Base_Data *nd;
114 114
@@ -116,7 +116,6 @@ _efl_vg_gradient_linear_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Linear_Da
116 EINA_RECTANGLE_SET(r, 116 EINA_RECTANGLE_SET(r,
117 nd->x + pd->start.x, nd->y + pd->start.y, 117 nd->x + pd->start.x, nd->y + pd->start.y,
118 pd->end.x - pd->start.x, pd->end.y - pd->start.x); 118 pd->end.x - pd->start.x, pd->end.y - pd->start.x);
119 return EINA_TRUE;
120} 119}
121 120
122EAPI void 121EAPI void
diff --git a/src/lib/evas/canvas/evas_vg_gradient_radial.c b/src/lib/evas/canvas/evas_vg_gradient_radial.c
index 9b84953..e79f4fd 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_radial.c
@@ -124,8 +124,8 @@ _efl_vg_gradient_radial_eo_base_destructor(Eo *obj,
124 eo_do_super(obj, MY_CLASS, eo_destructor()); 124 eo_do_super(obj, MY_CLASS, eo_destructor());
125} 125}
126 126
127static Eina_Bool 127static void
128_efl_vg_gradient_radial_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Radial_Data *pd, Eina_Rectangle *r) 128_efl_vg_gradient_radial_efl_vg_base_bounds_get(Eo *obj, Efl_VG_Gradient_Radial_Data *pd, Eina_Rectangle *r)
129{ 129{
130 Efl_VG_Base_Data *nd; 130 Efl_VG_Base_Data *nd;
131 131
@@ -134,7 +134,6 @@ _efl_vg_gradient_radial_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Radial_Da
134 nd->x + pd->center.x - pd->radius, 134 nd->x + pd->center.x - pd->radius,
135 nd->y + pd->center.y - pd->radius, 135 nd->y + pd->center.y - pd->radius,
136 pd->radius * 2, pd->radius * 2); 136 pd->radius * 2, pd->radius * 2);
137 return EINA_TRUE;
138} 137}
139 138
140EAPI void 139EAPI void
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index c2b791f..4254e59 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -191,11 +191,11 @@ _efl_vg_base_efl_gfx_base_size_get(Eo *obj,
191 Efl_VG_Base_Data *pd EINA_UNUSED, 191 Efl_VG_Base_Data *pd EINA_UNUSED,
192 int *w, int *h) 192 int *w, int *h)
193{ 193{
194 Eina_Rectangle bound = { 0, 0, 0, 0 }; 194 Eina_Rectangle r = { 0, 0, 0, 0 };
195 195
196 eo_do(obj, efl_vg_bound_get(&bound)); 196 eo_do(obj, efl_vg_bounds_get(&r));
197 if (w) *w = bound.w; 197 if (w) *w = r.w;
198 if (h) *h = bound.h; 198 if (h) *h = r.h;
199} 199}
200 200
201// Parent should be a container otherwise dismissing the stacking operation 201// Parent should be a container otherwise dismissing the stacking operation
@@ -425,10 +425,10 @@ _efl_vg_base_root_parent_get(Eo *obj)
425static void 425static void
426_efl_vg_base_walk_down_at(Eo *root, Eina_Array *a, Eina_Rectangle *r) 426_efl_vg_base_walk_down_at(Eo *root, Eina_Array *a, Eina_Rectangle *r)
427{ 427{
428 Eina_Rectangle bound; 428 Eina_Rectangle bounds;
429 429
430 eo_do(root, efl_vg_bound_get(&bound)); 430 eo_do(root, efl_vg_bounds_get(&bounds));
431 if (!eina_rectangles_intersect(&bound, r)) return ; 431 if (!eina_rectangles_intersect(&bounds, r)) return ;
432 432
433 eina_array_push(a, root); 433 eina_array_push(a, root);
434 434
@@ -465,7 +465,7 @@ _efl_vg_base_efl_gfx_stack_below_get(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
465 Eina_Array_Iterator iterator; 465 Eina_Array_Iterator iterator;
466 unsigned int i; 466 unsigned int i;
467 467
468 eo_do(obj, efl_vg_bound_get(&r)); 468 eo_do(obj, efl_vg_bounds_get(&r));
469 469
470 eina_array_step_set(&a, sizeof (Eina_Array), 8); 470 eina_array_step_set(&a, sizeof (Eina_Array), 8);
471 471
@@ -497,7 +497,7 @@ _efl_vg_base_efl_gfx_stack_above_get(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
497 Eina_Array_Iterator iterator; 497 Eina_Array_Iterator iterator;
498 unsigned int i; 498 unsigned int i;
499 499
500 eo_do(obj, efl_vg_bound_get(&r)); 500 eo_do(obj, efl_vg_bounds_get(&r));
501 501
502 eina_array_step_set(&a, sizeof (Eina_Array), 8); 502 eina_array_step_set(&a, sizeof (Eina_Array), 8);
503 503
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index 62c6449..644f9e6 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -28,14 +28,13 @@ struct _Efl_VG_Shape_Data
28 } stroke; 28 } stroke;
29}; 29};
30 30
31static Eina_Bool 31static void
32_efl_vg_shape_efl_vg_base_bound_get(Eo *obj, 32_efl_vg_shape_efl_vg_base_bounds_get(Eo *obj,
33 Efl_VG_Shape_Data *pd EINA_UNUSED, 33 Efl_VG_Shape_Data *pd EINA_UNUSED,
34 Eina_Rectangle *r) 34 Eina_Rectangle *r)
35{ 35{
36 // FIXME: Use the renderer bounding box when it has been created instead of an estimation 36 // FIXME: Use the renderer bounding box when it has been created instead of an estimation
37 eo_do(obj, efl_gfx_shape_bounding_box_get(r)); 37 eo_do(obj, efl_gfx_shape_bounding_box_get(r));
38 return EINA_TRUE;
39} 38}
40 39
41static void 40static void