From: Emden Gansner Date: Thu, 23 Mar 2017 18:42:21 +0000 (-0400) Subject: Support opacity in svg fonts. Issue #1217. X-Git-Tag: 2.42.0~190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e6b92b1d24a6deb478140f2e1410bc98e6b4d9f;p=graphviz Support opacity in svg fonts. Issue #1217. --- diff --git a/plugin/core/gvrender_core_svg.c b/plugin/core/gvrender_core_svg.c index 632e33c90..a24b53365 100644 --- a/plugin/core/gvrender_core_svg.c +++ b/plugin/core/gvrender_core_svg.c @@ -481,6 +481,8 @@ static void svg_textspan(GVJ_t * job, pointf p, textspan_t * span) gvprintf(job, " fill=\"#%02x%02x%02x\"", obj->pencolor.u.rgba[0], obj->pencolor.u.rgba[1], obj->pencolor.u.rgba[2]); + if (obj->pencolor.u.rgba[3] > 0 && obj->pencolor.u.rgba[3] < 255) + gvprintf(job, " fill-opacity=\"%f\"", ((float) obj->pencolor.u.rgba[3] / 255.0)); break; default: assert(0); /* internal error */