summaryrefslogtreecommitdiff
path: root/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-06-27 13:16:36 +0900
committerHermet Park <hermetpark@gmail.com>2019-06-27 13:18:28 +0900
commit7fcf887b6380efa43be6cdea91f85078a83d29dd (patch)
treee3169f2710e6afa654d3643cacd726040dc52dee /src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
parent35a5ed14942600626ab5c257288867e3e75039fb (diff)
evas svg: fix missing node opacity attribute.
Any svg node could have its opacity value, we missed implementing it. If a node have a opacity, it's opacity could be multiply with fill and stroke colors. @fix
Diffstat (limited to '')
-rw-r--r--src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
index 0bd37248d6..32bfb17d76 100644
--- a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
+++ b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
@@ -888,6 +888,12 @@ _handle_fill_rule_attr(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node* node, cons
888} 888}
889 889
890static void 890static void
891_handle_opacity_attr(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node* node, const char *value)
892{
893 node->style->opacity = _to_opacity(value);
894}
895
896static void
891_handle_fill_opacity_attr(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node* node, const char *value) 897_handle_fill_opacity_attr(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node* node, const char *value)
892{ 898{
893 node->style->fill.flags |= SVG_FILL_FLAGS_OPACITY; 899 node->style->fill.flags |= SVG_FILL_FLAGS_OPACITY;
@@ -915,6 +921,7 @@ static const struct {
915 STYLE_DEF(fill, fill), 921 STYLE_DEF(fill, fill),
916 STYLE_DEF(fill-rule, fill_rule), 922 STYLE_DEF(fill-rule, fill_rule),
917 STYLE_DEF(fill-opacity, fill_opacity), 923 STYLE_DEF(fill-opacity, fill_opacity),
924 STYLE_DEF(opacity, opacity),
918 STYLE_DEF(stroke, stroke), 925 STYLE_DEF(stroke, stroke),
919 STYLE_DEF(stroke-width, stroke_width), 926 STYLE_DEF(stroke-width, stroke_width),
920 STYLE_DEF(stroke-linejoin, stroke_linejoin), 927 STYLE_DEF(stroke-linejoin, stroke_linejoin),
@@ -1001,6 +1008,7 @@ _create_node(Svg_Node *parent, Svg_Node_Type type)
1001 node->style->fill.paint.none = EINA_FALSE; 1008 node->style->fill.paint.none = EINA_FALSE;
1002 // default fill opacity is 1 1009 // default fill opacity is 1
1003 node->style->fill.opacity = 255; 1010 node->style->fill.opacity = 255;
1011 node->style->opacity = 255;
1004 1012
1005 // default fill rule is nonzero 1013 // default fill rule is nonzero
1006 node->style->fill.fill_rule = EFL_GFX_FILL_RULE_WINDING; 1014 node->style->fill.fill_rule = EFL_GFX_FILL_RULE_WINDING;