]> granicus.if.org Git - graphviz/commitdiff
Move special case color code for points into point_init().
authorerg <devnull@localhost>
Wed, 31 Oct 2007 20:07:36 +0000 (20:07 +0000)
committererg <devnull@localhost>
Wed, 31 Oct 2007 20:07:36 +0000 (20:07 +0000)
lib/common/shapes.c

index 02c75756388fb798c8661f7434a83ebe08cfcb91..218e5d74c2a5dc600be98abaa007c10011e40ef1 100644 (file)
@@ -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);
 }