summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-10-15 14:53:25 +0900
committerHermet Park <hermetpark@gmail.com>2019-10-15 14:53:25 +0900
commit74e2c80b6e3d3d4ee25792140cdbc4a95ef08f3b (patch)
tree0e524b3641062daad5128977189de74bdcbcb182 /src
parentca32732373a5545fb3b23a6e7f69198d455c6370 (diff)
vg_common_svg: Support opacity attribute of <g> element
Summary: The <g> element can have an opacity. Therefore, if node type is SVG_NODE_G, set color. Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10371
Diffstat (limited to 'src')
-rw-r--r--src/static_libs/vg_common/vg_common_svg.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c
index 6cc66ae..1d01f9f 100644
--- a/src/static_libs/vg_common/vg_common_svg.c
+++ b/src/static_libs/vg_common/vg_common_svg.c
@@ -718,10 +718,7 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
718 718
719 if (node->type != SVG_NODE_DOC && !node->display) efl_gfx_entity_visible_set(vg, EINA_FALSE); 719 if (node->type != SVG_NODE_DOC && !node->display) efl_gfx_entity_visible_set(vg, EINA_FALSE);
720 720
721 if ((node->type == SVG_NODE_G) || (node->type == SVG_NODE_DOC)) return; 721 if (node->type == SVG_NODE_DOC) return;
722
723 // apply the fill style property
724 efl_gfx_shape_fill_rule_set(vg, style->fill.fill_rule);
725 722
726 // if fill property is NULL then do nothing 723 // if fill property is NULL then do nothing
727 if (style->fill.paint.none) 724 if (style->fill.paint.none)
@@ -757,6 +754,11 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
757 efl_gfx_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); 754 efl_gfx_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
758 } 755 }
759 756
757 if (node->type == SVG_NODE_G) return;
758
759 // apply the fill style property
760 efl_gfx_shape_fill_rule_set(vg, style->fill.fill_rule);
761
760 efl_gfx_shape_stroke_width_set(vg, style->stroke.width); 762 efl_gfx_shape_stroke_width_set(vg, style->stroke.width);
761 efl_gfx_shape_stroke_cap_set(vg, style->stroke.cap); 763 efl_gfx_shape_stroke_cap_set(vg, style->stroke.cap);
762 efl_gfx_shape_stroke_join_set(vg, style->stroke.join); 764 efl_gfx_shape_stroke_join_set(vg, style->stroke.join);