summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-11-30 13:56:58 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-11-30 16:09:37 +0900
commitad28bdfb5a464895a1a0ce3e909aa1c11529b3b3 (patch)
treef96c282ad74bbcac28014d673c8eef804fb18828
parentd957e0a6e48fdf4d3277492bccd62e31ff8a4037 (diff)
Efl.Gfx.Shape: implement Gfx.Path.interpolate{}
This fixes the Eolian 'interpolate' redefine warning.
Diffstat (limited to '')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c8
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.eo18
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c4
3 files changed, 7 insertions, 23 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index 45bf04da43..21e0b0c25c 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -60,9 +60,9 @@ _efl_gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
60 property->j = efl_gfx_shape_stroke_join_get(obj); 60 property->j = efl_gfx_shape_stroke_join_get(obj);
61} 61}
62 62
63static Eina_Bool 63EOLIAN static Eina_Bool
64_efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd, 64_efl_gfx_shape_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd,
65 const Eo *from, const Eo *to, double pos_map) 65 const Eo *from, const Eo *to, double pos_map)
66{ 66{
67 Efl_Gfx_Shape_Data *from_pd, *to_pd; 67 Efl_Gfx_Shape_Data *from_pd, *to_pd;
68 Efl_Gfx_Property property_from, property_to; 68 Efl_Gfx_Property property_from, property_to;
@@ -122,7 +122,7 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd,
122 efl_gfx_shape_stroke_join_set(obj, (pos_map < 0.5) ? 122 efl_gfx_shape_stroke_join_set(obj, (pos_map < 0.5) ?
123 property_from.j : property_to.j); 123 property_from.j : property_to.j);
124 124
125 return efl_gfx_path_interpolate(obj, from, to, pos_map); 125 return efl_gfx_path_interpolate(efl_super(obj, EFL_GFX_PATH_MIXIN), from, to, pos_map);
126} 126}
127 127
128static void 128static void
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo b/src/lib/efl/interfaces/efl_gfx_shape.eo
index e66b870615..bd3c769422 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.eo
+++ b/src/lib/efl/interfaces/efl_gfx_shape.eo
@@ -117,25 +117,9 @@ mixin Efl.Gfx.Shape (Efl.Gfx.Path)
117 One of $EFL_GFX_FILL_RULE_WINDING, $EFL_GFX_FILL_RULE_ODD_EVEN]] 117 One of $EFL_GFX_FILL_RULE_WINDING, $EFL_GFX_FILL_RULE_ODD_EVEN]]
118 } 118 }
119 } 119 }
120 interpolate {
121 [[Creates intermediary shape part-way between two shapes
122
123 Sets the data properties of $obj as the linear interpolation
124 of the $from and $to objects by $pos_map. In addition to
125 interpolating the path data, the two shapes' dash length, fill
126 color, and stroke style are also interpolated.
127
128 See also @Efl.Gfx.Path.interpolate.
129 ]]
130 return: bool; [[$true on success, $false otherwise]]
131 params {
132 @in from: const(Efl.Object); [[Source shape]]
133 @in to: const(Efl.Object); [[Destination shape]]
134 @in pos_map: double; [[Position map in range 0.0 to 1.0]]
135 }
136 }
137 } 120 }
138 implements { 121 implements {
139 Efl.Gfx.Path.copy_from; 122 Efl.Gfx.Path.copy_from;
123 Efl.Gfx.Path.interpolate;
140 } 124 }
141} 125}
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index b15694eeb3..177d05eaa3 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -163,7 +163,7 @@ _efl_vg_shape_efl_vg_interpolate(Eo *obj,
163 163
164 r = efl_vg_interpolate(efl_super(obj, MY_CLASS), from, to, pos_map); 164 r = efl_vg_interpolate(efl_super(obj, MY_CLASS), from, to, pos_map);
165 165
166 r &= efl_gfx_shape_interpolate(obj, from, to, pos_map); 166 r &= efl_gfx_path_interpolate(obj, from, to, pos_map);
167 167
168 if (fromd->fill && tod->fill && pd->fill) 168 if (fromd->fill && tod->fill && pd->fill)
169 { 169 {
@@ -402,7 +402,7 @@ evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data)
402EAPI Eina_Bool 402EAPI Eina_Bool
403evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map) 403evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map)
404{ 404{
405 return efl_gfx_shape_interpolate(obj, from, to, pos_map); 405 return efl_gfx_path_interpolate(obj, from, to, pos_map);
406} 406}
407 407
408EAPI Eina_Bool 408EAPI Eina_Bool