From: JunsuChoi Date: Thu, 11 Mar 2021 08:57:49 +0000 (+0900) Subject: vg_common_svg: Keep backward compatibility about display, opacity of SVG X-Git-Tag: accepted/tizen/unified/20210319.141010~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e393ea81a71a475c411275315979f80597904c15;p=platform%2Fupstream%2Fefl.git vg_common_svg: Keep backward compatibility about display, opacity of SVG Edje compiled in version 4.0 of tizen studio does not have eet description in paser related to display and opacity. Therefore, in later versions, display and opacity are always set to 0. so, it blocks the display and opacity features. When tizen studio's edje hosting service is in progress, this function can be added again. @tizen_only Change-Id: I1a34466522a691c8f88b76ec4f46a85193ee1314 --- diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 3313432..8ca582a 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -745,7 +745,13 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ // apply the transformation if (node->transform) efl_canvas_vg_node_transformation_set(vg, node->transform); - if (node->type != SVG_NODE_DOC && !node->display) evas_vg_node_visible_set(vg, EINA_FALSE); + //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG + //Edje compiled in version 4.0 of tizen studio does not have eet description in paser related to display and opacity. + //Therefore, in later versions, display and opacity are always set to 0. + //so, it blocks the display and opacity features. + //When tizen studio's edje hosting service is in progress, this function can be added again. + //if (node->type != SVG_NODE_DOC && !node->display) evas_vg_node_visible_set(vg, EINA_FALSE); + // if (node->type == SVG_NODE_DOC) return; @@ -774,14 +780,15 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ ((float) style->fill.paint.b) * fa, style->fill.opacity); } - //apply node opacity - if (style->opacity < 255) - { - int r, g, b, a; - evas_vg_node_color_get(vg, &r, &g, &b, &a); - float fa = ((float) style->opacity / 255); - evas_vg_node_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); - } + //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG + //if (style->opacity < 255) + // { + // int r, g, b, a; + // evas_vg_node_color_get(vg, &r, &g, &b, &a); + // float fa = ((float) style->opacity / 255); + // evas_vg_node_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); + // } + // if (node->type == SVG_NODE_G || node->type == SVG_NODE_CLIP_PATH) return; @@ -828,13 +835,14 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ } //apply node opacity to stroke color - if (style->opacity < 255) - { - int r, g, b, a; - evas_vg_shape_stroke_color_get(vg, &r, &g, &b, &a); - float fa = ((float) style->opacity / 255); - evas_vg_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); - } + //TIZEN_ONLY(210311): vg_common_svg: Keep backward compatibility about display, opacity of SVG + //if (style->opacity < 255) + // { + // int r, g, b, a; + // evas_vg_shape_stroke_color_get(vg, &r, &g, &b, &a); + // float fa = ((float) style->opacity / 255); + // evas_vg_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); + // } } static void