]> granicus.if.org Git - graphviz/commitdiff
if color list, then use only first member
authorellson <devnull@localhost>
Fri, 6 Jun 2008 17:42:57 +0000 (17:42 +0000)
committerellson <devnull@localhost>
Fri, 6 Jun 2008 17:42:57 +0000 (17:42 +0000)
lib/gvc/gvrender.c

index e507b9d5ac20151fe080cdb2b35729ec411b4b82..c9a123bae7c78a0c0f4c5d5c1d3946a69dac98f7 100644 (file)
@@ -669,7 +669,10 @@ void gvrender_set_pencolor(GVJ_t * job, char *name)
 {
     gvrender_engine_t *gvre = job->render.engine;
     gvcolor_t *color = &(job->obj->pencolor);
+    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)
@@ -683,6 +686,8 @@ void gvrender_set_pencolor(GVJ_t * job, char *name)
            cg->set_pencolor(name);
     }
 #endif
+    if (cp)  /* restore color list */
+       *cp = ':';
 }
 
 void gvrender_set_fillcolor(GVJ_t * job, char *name)