From 6e85fe0004ac292ade8c8bdebb864fa4d2216c47 Mon Sep 17 00:00:00 2001 From: ellson Date: Mon, 10 Jul 2006 23:41:53 +0000 Subject: [PATCH] use fill:none stroke:none for alpha values < 128 in svg --- plugin/core/gvrender_core_svg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin/core/gvrender_core_svg.c b/plugin/core/gvrender_core_svg.c index bdd7d6494..5ad1778f1 100644 --- a/plugin/core/gvrender_core_svg.c +++ b/plugin/core/gvrender_core_svg.c @@ -161,12 +161,17 @@ static void svggen_grstyle(GVJ_t * job, int filled) gvstyle_t *style = job->style; svggen_fputs(job, " style=\"fill:"); - if (filled) + if (filled && ! (style->fillcolor.type == RGBA_BYTE + && style->fillcolor.u.RGBA[3] < 128)) svggen_print_color(job, style->fillcolor); else svggen_fputs(job, "none"); svggen_fputs(job, ";stroke:"); - svggen_print_color(job, style->pencolor); + if (! (style->pencolor.type == RGBA_BYTE + && style->pencolor.u.RGBA[3] < 128)) + svggen_print_color(job, style->pencolor); + else + svggen_fputs(job, "none"); if (style->penwidth != PENWIDTH_NORMAL) svggen_printf(job, ";stroke-width:%g", style->penwidth); if (style->pen == PEN_DASHED) { -- 2.40.0