From: Emden Gansner Date: Thu, 16 Aug 2012 21:04:35 +0000 (-0400) Subject: Fix uninitialized fill color for drawing tapered edges X-Git-Tag: LAST_LIBGRAPH~32^2~336^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5843801b852d4e5e56c8ca3733fd918434678b23;p=graphviz Fix uninitialized fill color for drawing tapered edges --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 11e2de9f8..6dc18c9e2 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -298,6 +298,7 @@ static char **checkClusterStyle(graph_t* sg, int *flagp) char *style; char **pstyle = 0; int istyle = 0; + static boolean warned = 0; if (((style = agget(sg, "style")) != 0) && style[0]) { char **pp; @@ -310,21 +311,21 @@ static char **checkClusterStyle(graph_t* sg, int *flagp) pp++; }else if (strcmp(p, "radial") == 0) { istyle |= (FILLED | RADIAL); - qp = pp; /* remove rounded from list passed to renderer */ + qp = pp; /* remove style from list passed to renderer */ do { qp++; *(qp-1) = *qp; } while (*qp); }else if (strcmp(p, "striped") == 0) { istyle |= STRIPED; - qp = pp; /* remove rounded from list passed to renderer */ + qp = pp; /* remove style from list passed to renderer */ do { qp++; *(qp-1) = *qp; } while (*qp); }else if (strcmp(p, "rounded") == 0) { istyle |= ROUNDED; - qp = pp; /* remove rounded from list passed to renderer */ + qp = pp; /* remove style from list passed to renderer */ do { qp++; *(qp-1) = *qp; @@ -332,6 +333,10 @@ static char **checkClusterStyle(graph_t* sg, int *flagp) } else pp++; } } + if ((istyle & ROUNDED) && (istyle & STRIPED) && !warned) { + agerr (AGWARN, "Striped, rounded clusters are currently unimplemented.\n"); + warned = 1; + } *flagp = istyle; return pstyle; @@ -2253,6 +2258,7 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e, char** styles) if (tapered) { stroke_t* stp; if (*color == '\0') color = DEFAULT_COLOR; + if (*fillcolor == '\0') fillcolor = DEFAULT_COLOR; gvrender_set_pencolor(job, "transparent"); gvrender_set_fillcolor(job, color); bz = ED_spl(e)->list[0];