From: erg Date: Wed, 27 Jan 2010 17:21:22 +0000 (+0000) Subject: Handle styles in background drawing X-Git-Tag: LAST_LIBGRAPH~32^2~1462 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=720dad965d41c8d391c3e3d9fdce5eb7ecb5bf27;p=graphviz Handle styles in background drawing --- diff --git a/lib/common/emit.c b/lib/common/emit.c index d5a2ee9df..7c64db3b3 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -872,6 +872,7 @@ static void emit_xdot (GVJ_t * job, xdot* xd) char* fontname; exdot_op* op; int i; + char** styles = 0; op = (exdot_op*)(xd->ops); for (i = 0; i < xd->cnt; i++) { @@ -919,6 +920,8 @@ static void emit_xdot (GVJ_t * job, xdot* xd) fontname = op->op.u.font.name; break; case xd_style : + styles = parse_style (op->op.u.style); + gvrender_set_style (job, styles); break; case xd_image : if (image_warn) { @@ -929,6 +932,8 @@ static void emit_xdot (GVJ_t * job, xdot* xd) } op++; } + if (styles) + gvrender_set_style(job, job->gvc->defaultlinestyle); free (pts); } @@ -2921,7 +2926,7 @@ static void cleanup(void) #endif /* parse_style: - * This is one of the worse internal designs in graphviz. + * This is one of the worst internal designs in graphviz. * The use of '\0' characters within strings seems cute but it * makes all of the standard functions useless if not dangerous. * Plus the function uses static memory for both the array and