From ad28bdfb5a464895a1a0ce3e909aa1c11529b3b3 Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Thu, 30 Nov 2017 13:56:58 +0900 Subject: [PATCH] Efl.Gfx.Shape: implement Gfx.Path.interpolate{} This fixes the Eolian 'interpolate' redefine warning. --- src/lib/efl/interfaces/efl_gfx_shape.c | 8 ++++---- src/lib/efl/interfaces/efl_gfx_shape.eo | 18 +----------------- src/lib/evas/canvas/evas_vg_shape.c | 4 ++-- 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 45bf04d..21e0b0c 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) property->j = efl_gfx_shape_stroke_join_get(obj); } -static Eina_Bool -_efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd, - const Eo *from, const Eo *to, double pos_map) +EOLIAN static Eina_Bool +_efl_gfx_shape_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd, + const Eo *from, const Eo *to, double pos_map) { Efl_Gfx_Shape_Data *from_pd, *to_pd; Efl_Gfx_Property property_from, property_to; @@ -122,7 +122,7 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd, efl_gfx_shape_stroke_join_set(obj, (pos_map < 0.5) ? property_from.j : property_to.j); - return efl_gfx_path_interpolate(obj, from, to, pos_map); + return efl_gfx_path_interpolate(efl_super(obj, EFL_GFX_PATH_MIXIN), from, to, pos_map); } static void diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo b/src/lib/efl/interfaces/efl_gfx_shape.eo index e66b870..bd3c769 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) One of $EFL_GFX_FILL_RULE_WINDING, $EFL_GFX_FILL_RULE_ODD_EVEN]] } } - interpolate { - [[Creates intermediary shape part-way between two shapes - - Sets the data properties of $obj as the linear interpolation - of the $from and $to objects by $pos_map. In addition to - interpolating the path data, the two shapes' dash length, fill - color, and stroke style are also interpolated. - - See also @Efl.Gfx.Path.interpolate. - ]] - return: bool; [[$true on success, $false otherwise]] - params { - @in from: const(Efl.Object); [[Source shape]] - @in to: const(Efl.Object); [[Destination shape]] - @in pos_map: double; [[Position map in range 0.0 to 1.0]] - } - } } implements { Efl.Gfx.Path.copy_from; + Efl.Gfx.Path.interpolate; } } diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c index b15694e..177d05e 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, r = efl_vg_interpolate(efl_super(obj, MY_CLASS), from, to, pos_map); - r &= efl_gfx_shape_interpolate(obj, from, to, pos_map); + r &= efl_gfx_path_interpolate(obj, from, to, pos_map); if (fromd->fill && tod->fill && pd->fill) { @@ -402,7 +402,7 @@ evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data) EAPI Eina_Bool evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map) { - return efl_gfx_shape_interpolate(obj, from, to, pos_map); + return efl_gfx_path_interpolate(obj, from, to, pos_map); } EAPI Eina_Bool -- 2.7.4