From a7311c44e04f5a718b059a93b7452f7e90aaf745 Mon Sep 17 00:00:00 2001 From: ellson Date: Fri, 26 Oct 2007 16:11:52 +0000 Subject: [PATCH] - fix missing layers support - fix misaligned bgcolor rectangle in -Gviewport --- lib/common/emit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index aba905eba..1d93a020d 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -558,7 +558,7 @@ static void firstlayer(GVJ_t *job) { job->numLayers = job->gvc->numLayers; if ((job->numLayers > 1) - && (! (gvrender_features(job) & GVDEVICE_DOES_LAYERS))) { + && (! (job->flags & GVDEVICE_DOES_LAYERS))) { agerr(AGWARN, "layers not supported in %s output\n", job->output_langname); job->numLayers = 1; @@ -763,16 +763,17 @@ static boolean write_node_test(Agraph_t * g, Agnode_t * n) void emit_background(GVJ_t * job, graph_t *g) { char *str; - + if (! ((str = agget(g, "bgcolor")) && str[0])) { - if (gvrender_features(job) & GVRENDER_NO_BG) + if (job->flags & GVRENDER_NO_BG) str = "transparent"; else str = "white"; } + gvrender_set_fillcolor(job, str); gvrender_set_pencolor(job, str); - gvrender_box(job, job->pageBox, TRUE); /* filled */ + gvrender_box(job, job->clip, TRUE); /* filled */ } static void setup_page(GVJ_t * job, graph_t * g) @@ -1473,7 +1474,7 @@ static void emit_edge_graphics(GVJ_t * job, edge_t * e) bzf.list = malloc(sizeof(pointf) * bzf.size); for (j = 0; j < bz.size; j++) P2PF(bz.list[j], bzf.list[j]); - if (gvrender_features(job) & GVRENDER_DOES_ARROWS) { + if (job->flags & GVRENDER_DOES_ARROWS) { gvrender_beziercurve(job, bzf.list, bz.size, bz.sflag, bz.eflag, FALSE); } else { -- 2.40.0