From: Hermet Park Date: Thu, 3 Dec 2020 11:54:10 +0000 (+0900) Subject: canvas vg_container: code refactoring. X-Git-Tag: accepted/tizen/unified/20201214.124451~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81166b53ea3576b05730c4087aded4d69dc607d1;p=platform%2Fupstream%2Fefl.git canvas vg_container: code refactoring. we can make logic simpler. Change-Id: Ie688940165299ee8fbdd85afcf08277642df15c8 --- diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c index 1004ea1..2082010 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_container.c +++ b/src/lib/evas/canvas/efl_canvas_vg_container.c @@ -394,42 +394,16 @@ _efl_canvas_vg_container_efl_gfx_path_bounds_get(const Eo *obj EINA_UNUSED, } static void -_efl_canvas_vg_container_efl_gfx_color_color_set(Eo *obj EINA_UNUSED, -#ifdef HAVE_THORVG - Efl_Canvas_Vg_Container_Data *pd, -#else - Efl_Canvas_Vg_Container_Data *pd EINA_UNUSED, -#endif - int r EINA_UNUSED, - int g EINA_UNUSED, - int b EINA_UNUSED, - int a) +_efl_canvas_vg_container_efl_gfx_color_color_set(Eo *obj, Efl_Canvas_Vg_Container_Data *pd, int r, int g, int b, int a) { -#ifdef HAVE_THORVG - if (pd && pd->scene) - tvg_paint_set_opacity(pd->scene, a); - efl_canvas_vg_node_change(obj); -#endif -} + efl_gfx_color_set(efl_super(obj, MY_CLASS), r, g, b, a); -static void -_efl_canvas_vg_container_efl_gfx_color_color_get(const Eo *obj EINA_UNUSED, #ifdef HAVE_THORVG - Efl_Canvas_Vg_Container_Data *pd, -#else - Efl_Canvas_Vg_Container_Data *pd EINA_UNUSED, -#endif - int* r EINA_UNUSED, - int* g EINA_UNUSED, - int* b EINA_UNUSED, - int* a) -{ -#ifdef HAVE_THORVG - if (pd && pd->scene) - tvg_paint_get_opacity(pd->scene, (uint8_t*)a); + if (pd->scene) tvg_paint_set_opacity(pd->scene, a); #endif } + static Efl_VG * _efl_canvas_vg_container_child_get(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Container_Data *pd, const char *name) { diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.eo b/src/lib/evas/canvas/efl_canvas_vg_container.eo index 1133e82..70305d7 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_container.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_container.eo @@ -24,7 +24,7 @@ class @beta Efl.Canvas.Vg.Container extends Efl.Canvas.Vg.Node Efl.Object.parent { set; } Efl.Gfx.Path.bounds_get; Efl.Gfx.Path.interpolate; - Efl.Gfx.Color.color { get; set; } + Efl.Gfx.Color.color { set; } Efl.Duplicate.duplicate; Efl.Canvas.Vg.Node.comp_method { set; } }