aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_vg_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_shape.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c141
1 files changed, 71 insertions, 70 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index 520c68436f..c61b1cf293 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -34,7 +34,7 @@ _efl_vg_shape_efl_vg_base_bounds_get(Eo *obj,
Eina_Rectangle *r)
{
// FIXME: Use the renderer bounding box when it has been created instead of an estimation
- eo_do(obj, efl_gfx_shape_bounds_get(r));
+ eo_do(obj, efl_gfx_shape_bounds_get(obj, r));
}
static void
@@ -99,8 +99,8 @@ _efl_vg_shape_efl_gfx_base_color_part_set(Eo *obj, Efl_VG_Shape_Data *pd,
return EINA_TRUE;
}
- eo_do_super(obj, EFL_VG_SHAPE_CLASS,
- ret = efl_gfx_color_part_set(part, r, g, b, a));
+
+ ret = eo_super_efl_gfx_color_part_set(EFL_VG_SHAPE_CLASS, obj, part, r, g, b, a);
return ret;
}
@@ -129,8 +129,7 @@ _efl_vg_shape_efl_gfx_base_color_part_get(Eo *obj, Efl_VG_Shape_Data *pd,
return EINA_TRUE;
}
- eo_do_super(obj, EFL_VG_SHAPE_CLASS,
- ret = efl_gfx_color_part_get(part, r, g, b, a));
+ ret = eo_super_efl_gfx_color_part_get(EFL_VG_SHAPE_CLASS, obj, part, r, g, b, a);
return ret;
}
@@ -300,20 +299,20 @@ _efl_vg_shape_render_pre(Eo *obj EINA_UNUSED,
if (!nd->renderer)
{
- eo_do(s, nd->renderer = ector_surface_renderer_factory_new(ECTOR_RENDERER_GENERIC_SHAPE_MIXIN));
+ eo_do(s, nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN));
}
eo_do(nd->renderer,
- ector_renderer_transformation_set(current),
- ector_renderer_origin_set(xn, yn),
- ector_renderer_color_set(nd->r, nd->g, nd->b, nd->a),
- ector_renderer_visibility_set(nd->visibility),
- ector_renderer_mask_set(mask ? mask->renderer : NULL),
- ector_renderer_shape_fill_set(fill ? fill->renderer : NULL),
- ector_renderer_shape_stroke_fill_set(stroke_fill ? stroke_fill->renderer : NULL),
- ector_renderer_shape_stroke_marker_set(stroke_marker ? stroke_marker->renderer : NULL),
- efl_gfx_shape_dup(obj),
- ector_renderer_prepare());
+ ector_renderer_transformation_set(nd->renderer, current),
+ ector_renderer_origin_set(nd->renderer, xn, yn),
+ ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a),
+ ector_renderer_visibility_set(nd->renderer, nd->visibility),
+ ector_renderer_mask_set(nd->renderer, mask ? mask->renderer : NULL),
+ ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL),
+ ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL),
+ ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL),
+ efl_gfx_shape_dup(nd->renderer, obj),
+ ector_renderer_prepare(nd->renderer));
}
static Eo *
@@ -321,7 +320,7 @@ _efl_vg_shape_eo_base_constructor(Eo *obj, Efl_VG_Shape_Data *pd)
{
Efl_VG_Base_Data *nd;
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_super_eo_constructor( MY_CLASS, NULL);
pd->stroke.cap = EFL_GFX_CAP_BUTT;
pd->stroke.join = EFL_GFX_JOIN_MITER;
@@ -338,7 +337,7 @@ _efl_vg_shape_eo_base_constructor(Eo *obj, Efl_VG_Shape_Data *pd)
static void
_efl_vg_shape_eo_base_destructor(Eo *obj, Efl_VG_Shape_Data *pd EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_super_eo_destructor(MY_CLASS, obj);
}
static Eina_Bool
@@ -353,23 +352,23 @@ _efl_vg_shape_efl_vg_base_interpolate(Eo *obj,
fromd = eo_data_scope_get(from, EFL_VG_SHAPE_CLASS);
tod = eo_data_scope_get(to, EFL_VG_SHAPE_CLASS);
- eo_do_super(obj, MY_CLASS, r = efl_vg_interpolate(from, to, pos_map));
+ r = eo_super_efl_vg_interpolate(MY_CLASS, obj, from, to, pos_map);
- eo_do(obj, r &= efl_gfx_shape_interpolate(from, to, pos_map));
+ eo_do(obj, r &= efl_gfx_shape_interpolate(obj, from, to, pos_map));
if (fromd->fill && tod->fill && pd->fill)
{
- eo_do(pd->fill, r &= efl_vg_interpolate(fromd->fill, tod->fill, pos_map));
+ eo_do(pd->fill, r &= efl_vg_interpolate(pd->fill, fromd->fill, tod->fill, pos_map));
}
if (fromd->stroke.fill && tod->stroke.fill && pd->stroke.fill)
{
eo_do(pd->stroke.fill,
- r &= efl_vg_interpolate(fromd->stroke.fill, tod->stroke.fill, pos_map));
+ r &= efl_vg_interpolate(pd->stroke.fill, fromd->stroke.fill, tod->stroke.fill, pos_map));
}
if (fromd->stroke.marker && tod->stroke.marker && pd->stroke.marker)
{
eo_do(pd->stroke.marker,
- r &= efl_vg_interpolate(fromd->stroke.marker, tod->stroke.marker, pos_map));
+ r &= efl_vg_interpolate(pd->stroke.marker, fromd->stroke.marker, tod->stroke.marker, pos_map));
}
return r;
@@ -382,38 +381,38 @@ _efl_vg_shape_efl_vg_base_dup(Eo *obj, Efl_VG_Shape_Data *pd EINA_UNUSED, const
Eo *parent;
Eo *fill = NULL, *stroke_fill = NULL, *stroke_marker = NULL;
- eo_do_super(obj, MY_CLASS, efl_vg_dup(from));
+ eo_super_efl_vg_dup(MY_CLASS, obj, from);
- eo_do(obj, parent = eo_parent_get());
+ eo_do(obj, parent = eo_parent_get(obj));
fromd = eo_data_scope_get(from, MY_CLASS);
if (fromd->fill)
{
- fill = eo_add(eo_class_get(fromd->fill),
+ eo_add(fill, eo_class_get(fromd->fill),
parent,
- efl_vg_dup(fromd->fill));
+ efl_vg_dup(NULL, fromd->fill));
}
if (fromd->stroke.fill)
{
- stroke_fill = eo_add(eo_class_get(fromd->stroke.fill),
+ eo_add(stroke_fill, eo_class_get(fromd->stroke.fill),
parent,
- efl_vg_dup(fromd->stroke.fill));
+ efl_vg_dup(NULL, fromd->stroke.fill));
}
if (fromd->stroke.marker)
{
- stroke_marker = eo_add(eo_class_get(fromd->stroke.marker),
+ eo_add(stroke_marker, eo_class_get(fromd->stroke.marker),
parent,
- efl_vg_dup(fromd->stroke.marker));
+ efl_vg_dup(NULL, fromd->stroke.marker));
}
eo_do(obj,
- efl_vg_shape_fill_set(fill),
- efl_vg_shape_stroke_fill_set(stroke_fill),
- efl_vg_shape_stroke_marker_set(stroke_marker),
- efl_gfx_shape_dup(from));
+ efl_vg_shape_fill_set(obj, fill),
+ efl_vg_shape_stroke_fill_set(obj, stroke_fill),
+ efl_vg_shape_stroke_marker_set(obj, stroke_marker),
+ efl_gfx_shape_dup(obj, from));
}
EAPI double
@@ -421,25 +420,25 @@ evas_vg_shape_stroke_scale_get(Eo *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_stroke_scale_get());
+ return eo_do_ret(obj, ret, efl_gfx_shape_stroke_scale_get(obj));
}
EAPI void
evas_vg_shape_stroke_scale_set(Eo *obj, double s)
{
- eo_do(obj, efl_gfx_shape_stroke_scale_set(s));
+ eo_do(obj, efl_gfx_shape_stroke_scale_set(obj, s));
}
EAPI void
evas_vg_shape_stroke_color_get(Eo *obj, int *r, int *g, int *b, int *a)
{
- eo_do(obj, efl_gfx_shape_stroke_color_get(r, g, b, a));
+ eo_do(obj, efl_gfx_shape_stroke_color_get(obj, r, g, b, a));
}
EAPI void
evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a)
{
- eo_do(obj, efl_gfx_shape_stroke_color_set(r, g, b, a));
+ eo_do(obj, efl_gfx_shape_stroke_color_set(obj, r, g, b, a));
}
EAPI double
@@ -447,13 +446,13 @@ evas_vg_shape_stroke_width_get(Eo *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_stroke_width_get());
+ return eo_do_ret(obj, ret, efl_gfx_shape_stroke_width_get(obj));
}
EAPI void
evas_vg_shape_stroke_width_set(Eo *obj, double w)
{
- eo_do(obj, efl_gfx_shape_stroke_width_set(w));
+ eo_do(obj, efl_gfx_shape_stroke_width_set(obj, w));
}
EAPI double
@@ -461,25 +460,25 @@ evas_vg_shape_stroke_location_get(Eo *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_stroke_location_get());
+ return eo_do_ret(obj, ret, efl_gfx_shape_stroke_location_get(obj));
}
EAPI void
evas_vg_shape_stroke_location_set(Eo *obj, double centered)
{
- eo_do(obj, efl_gfx_shape_stroke_location_set(centered));
+ eo_do(obj, efl_gfx_shape_stroke_location_set(obj, centered));
}
EAPI void
evas_vg_shape_stroke_dash_get(Eo *obj, const Efl_Gfx_Dash **dash, unsigned int *length)
{
- eo_do(obj, efl_gfx_shape_stroke_dash_get(dash, length));
+ eo_do(obj, efl_gfx_shape_stroke_dash_get(obj, dash, length));
}
EAPI void
evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length)
{
- eo_do(obj, efl_gfx_shape_stroke_dash_set(dash, length));
+ eo_do(obj, efl_gfx_shape_stroke_dash_set(obj, dash, length));
}
EAPI Efl_Gfx_Cap
@@ -487,13 +486,13 @@ evas_vg_shape_stroke_cap_get(Eo *obj)
{
Efl_Gfx_Cap ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_stroke_cap_get());
+ return eo_do_ret(obj, ret, efl_gfx_shape_stroke_cap_get(obj));
}
EAPI void
evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c)
{
- eo_do(obj, efl_gfx_shape_stroke_cap_set(c));
+ eo_do(obj, efl_gfx_shape_stroke_cap_set(obj, c));
}
EAPI Efl_Gfx_Join
@@ -501,121 +500,121 @@ evas_vg_shape_stroke_join_get(Eo *obj)
{
Efl_Gfx_Join ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_stroke_join_get());
+ return eo_do_ret(obj, ret, efl_gfx_shape_stroke_join_get(obj));
}
EAPI void
evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j)
{
- eo_do(obj, efl_gfx_shape_stroke_join_set(j));
+ eo_do(obj, efl_gfx_shape_stroke_join_set(obj, j));
}
EAPI void
evas_vg_shape_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points)
{
- eo_do(obj, efl_gfx_shape_path_set(op, points));
+ eo_do(obj, efl_gfx_shape_path_set(obj, op, points));
}
EAPI void
evas_vg_shape_shape_path_get(Eo *obj, const Efl_Gfx_Path_Command **op, const double **points)
{
- eo_do(obj, efl_gfx_shape_path_get(op, points));
+ eo_do(obj, efl_gfx_shape_path_get(obj, op, points));
}
EAPI void
evas_vg_shape_shape_path_length_get(Eo *obj, unsigned int *commands, unsigned int *points)
{
- eo_do(obj, efl_gfx_shape_path_length_get(commands, points));
+ eo_do(obj, efl_gfx_shape_path_length_get(obj, commands, points));
}
EAPI void
evas_vg_shape_shape_current_get(Eo *obj, double *x, double *y)
{
- eo_do(obj, efl_gfx_shape_current_get(x, y));
+ eo_do(obj, efl_gfx_shape_current_get(obj, x, y));
}
EAPI void
evas_vg_shape_shape_current_ctrl_get(Eo *obj, double *x, double *y)
{
- eo_do(obj, efl_gfx_shape_current_ctrl_get(x, y));
+ eo_do(obj, efl_gfx_shape_current_ctrl_get(obj, x, y));
}
EAPI void
evas_vg_shape_shape_dup(Eo *obj, Eo *dup_from)
{
- eo_do(obj, efl_gfx_shape_dup(dup_from));
+ eo_do(obj, efl_gfx_shape_dup(obj, dup_from));
}
EAPI void
evas_vg_shape_shape_reset(Eo *obj)
{
- eo_do(obj, efl_gfx_shape_reset());
+ eo_do(obj, efl_gfx_shape_reset(obj));
}
EAPI void
evas_vg_shape_shape_append_move_to(Eo *obj, double x, double y)
{
- eo_do(obj, efl_gfx_shape_append_move_to(x, y));
+ eo_do(obj, efl_gfx_shape_append_move_to(obj, x, y));
}
EAPI void
evas_vg_shape_shape_append_line_to(Eo *obj, double x, double y)
{
- eo_do(obj, efl_gfx_shape_append_line_to(x, y));
+ eo_do(obj, efl_gfx_shape_append_line_to(obj, x, y));
}
EAPI void
evas_vg_shape_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
{
- eo_do(obj, efl_gfx_shape_append_quadratic_to(x, y, ctrl_x, ctrl_y));
+ eo_do(obj, efl_gfx_shape_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y));
}
EAPI void
evas_vg_shape_shape_append_squadratic_to(Eo *obj, double x, double y)
{
- eo_do(obj, efl_gfx_shape_append_squadratic_to(x, y));
+ eo_do(obj, efl_gfx_shape_append_squadratic_to(obj, x, y));
}
EAPI void
evas_vg_shape_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
{
- eo_do(obj, efl_gfx_shape_append_cubic_to(x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1));
+ eo_do(obj, efl_gfx_shape_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1));
}
EAPI void
evas_vg_shape_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
{
- eo_do(obj, efl_gfx_shape_append_scubic_to(x, y, ctrl_x, ctrl_y));
+ eo_do(obj, efl_gfx_shape_append_scubic_to(obj, x, y, ctrl_x, ctrl_y));
}
EAPI void
evas_vg_shape_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
{
- eo_do(obj, efl_gfx_shape_append_arc_to(x, y, rx, ry, angle, large_arc, sweep));
+ eo_do(obj, efl_gfx_shape_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep));
}
EAPI void
evas_vg_shape_shape_append_close(Eo *obj)
{
- eo_do(obj, efl_gfx_shape_append_close());
+ eo_do(obj, efl_gfx_shape_append_close(obj));
}
EAPI void
evas_vg_shape_shape_append_circle(Eo *obj, double x, double y, double radius)
{
- eo_do(obj, efl_gfx_shape_append_circle(x, y, radius));
+ eo_do(obj, efl_gfx_shape_append_circle(obj, x, y, radius));
}
EAPI void
evas_vg_shape_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry)
{
- eo_do(obj, efl_gfx_shape_append_rect(x, y, w, h, rx, ry));
+ eo_do(obj, efl_gfx_shape_append_rect(obj, x, y, w, h, rx, ry));
}
EAPI void
evas_vg_shape_shape_append_svg_path(Eo *obj, const char *svg_path_data)
{
- eo_do(obj, efl_gfx_shape_append_svg_path(svg_path_data));
+ eo_do(obj, efl_gfx_shape_append_svg_path(obj, svg_path_data));
}
EAPI Eina_Bool
@@ -623,7 +622,7 @@ evas_vg_shape_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double po
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_interpolate(from, to, pos_map));
+ return eo_do_ret(obj, ret, efl_gfx_shape_interpolate(obj, from, to, pos_map));
}
EAPI Eina_Bool
@@ -631,13 +630,15 @@ evas_vg_shape_shape_equal_commands(Eo *obj, const Eo *with)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_gfx_shape_equal_commands(with));
+ return eo_do_ret(obj, ret, efl_gfx_shape_equal_commands(obj, with));
}
EAPI Efl_VG*
evas_vg_shape_add(Efl_VG *parent)
{
- return eo_add(EFL_VG_SHAPE_CLASS, parent);
+ Eo* o;
+ eo_add(o, EFL_VG_SHAPE_CLASS, parent);
+ return o;
}
#include "efl_vg_shape.eo.c"