]> granicus.if.org Git - graphviz/commitdiff
deal with colorlists in fillcolor code too
authorellson <devnull@localhost>
Fri, 6 Jun 2008 18:15:54 +0000 (18:15 +0000)
committerellson <devnull@localhost>
Fri, 6 Jun 2008 18:15:54 +0000 (18:15 +0000)
lib/gvc/gvrender.c

index c9a123bae7c78a0c0f4c5d5c1d3946a69dac98f7..cdb5e5f2554b56c058e8a8e91e58fd9ff59ca7f9 100644 (file)
@@ -694,7 +694,10 @@ void gvrender_set_fillcolor(GVJ_t * job, char *name)
 {
     gvrender_engine_t *gvre = job->render.engine;
     gvcolor_t *color = &(job->obj->fillcolor);
+    char *cp = NULL;
 
+    if ((cp = strstr(name, ":"))) /* if its a color list, then use only first */
+       *cp = '\0';
     if (gvre) {
        gvrender_resolve_color(job->render.features, name, color);
        if (gvre->resolve_color)
@@ -708,6 +711,8 @@ void gvrender_set_fillcolor(GVJ_t * job, char *name)
            cg->set_fillcolor(name);
     }
 #endif
+    if (cp)
+       *cp = ':';
 }
 
 void gvrender_set_style(GVJ_t * job, char **s)