From: erg Date: Wed, 31 Oct 2007 20:07:36 +0000 (+0000) Subject: Move special case color code for points into point_init(). X-Git-Tag: LAST_LIBGRAPH~32^2~5107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e923c751edf27afbad53a4cc72a42fc4ad8c11d4;p=graphviz Move special case color code for points into point_init(). --- diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 02c757563..218e5d74c 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -258,13 +258,11 @@ char *findFill(node_t * n) /* for backward compatibilty, default fill is same as pen */ color = late_nnstring(n, N_color, ""); if (!color[0]) { - if (ND_shape(n) == point_desc) { - color = "black"; - } #ifdef WITH_CODEGENS - else if (Output_lang == MIF) color = "black"; + if (Output_lang == MIF) color = "black"; + else #endif - else color = DEFAULT_FILL; + color = DEFAULT_FILL; } } return color; @@ -1518,6 +1516,7 @@ static void poly_gencode(GVJ_t * job, node_t * n) static void point_init(node_t * n) { textlabel_t *p; + char* color; if (!point_desc) { shape_desc *ptr; @@ -1550,6 +1549,9 @@ static void point_init(node_t * n) } else ND_width(n) = ND_height(n) = DEF_POINT; + color = late_nnstring(n, N_color, ""); + if (!color[0]) + agsafeset(n, "color", "black", ""); poly_init(n); }