Efl.Gfx.Shape: implement Gfx.Path.interpolate{}

This fixes the Eolian 'interpolate' redefine warning.
This commit is contained in:
Amitesh Singh 2017-11-30 13:56:58 +09:00
parent d957e0a6e4
commit ad28bdfb5a
3 changed files with 7 additions and 23 deletions

View File

@ -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

View File

@ -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;
}
}

View File

@ -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