summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_shape.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-06-19 11:26:46 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-08-21 16:40:31 +0200
commit05fdfcc76a7eb57d00ae52d3ab2b9a1eb3ee0db9 (patch)
tree1e56e909ecaaf0d69b422f5173ea514b56dd84dc /src/lib/evas/canvas/evas_vg_shape.c
parent126edbb48c4f065fe68cb4d60760102498d93ad2 (diff)
evas: add logic to duplicate recursively an Efl_VG_Node tree.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_shape.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index d17268d..520c684 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -375,6 +375,47 @@ _efl_vg_shape_efl_vg_base_interpolate(Eo *obj,
375 return r; 375 return r;
376} 376}
377 377
378static void
379_efl_vg_shape_efl_vg_base_dup(Eo *obj, Efl_VG_Shape_Data *pd EINA_UNUSED, const Efl_VG_Base *from)
380{
381 Efl_VG_Shape_Data *fromd;
382 Eo *parent;
383 Eo *fill = NULL, *stroke_fill = NULL, *stroke_marker = NULL;
384
385 eo_do_super(obj, MY_CLASS, efl_vg_dup(from));
386
387 eo_do(obj, parent = eo_parent_get());
388
389 fromd = eo_data_scope_get(from, MY_CLASS);
390
391 if (fromd->fill)
392 {
393 fill = eo_add(eo_class_get(fromd->fill),
394 parent,
395 efl_vg_dup(fromd->fill));
396 }
397
398 if (fromd->stroke.fill)
399 {
400 stroke_fill = eo_add(eo_class_get(fromd->stroke.fill),
401 parent,
402 efl_vg_dup(fromd->stroke.fill));
403 }
404
405 if (fromd->stroke.marker)
406 {
407 stroke_marker = eo_add(eo_class_get(fromd->stroke.marker),
408 parent,
409 efl_vg_dup(fromd->stroke.marker));
410 }
411
412 eo_do(obj,
413 efl_vg_shape_fill_set(fill),
414 efl_vg_shape_stroke_fill_set(stroke_fill),
415 efl_vg_shape_stroke_marker_set(stroke_marker),
416 efl_gfx_shape_dup(from));
417}
418
378EAPI double 419EAPI double
379evas_vg_shape_stroke_scale_get(Eo *obj) 420evas_vg_shape_stroke_scale_get(Eo *obj)
380{ 421{