From: ellson Date: Thu, 27 Oct 2005 15:45:20 +0000 (+0000) Subject: fix problem with black dots around white background in bitmap outputs X-Git-Tag: LAST_LIBGRAPH~32^2~7004 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e67a5c28388d6917a8402ad43d48c23e12e79964;p=graphviz fix problem with black dots around white background in bitmap outputs --- diff --git a/lib/common/emit.c b/lib/common/emit.c index e8fb79dad..9bd39fea3 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -362,10 +362,13 @@ void emit_background(GVJ_t * job, graph_t *g) if (! ((str = agget(g, "bgcolor")) && str[0])) str = "white"; - AF[0].x = AF[1].x = job->pageBox.LL.x; - AF[2].x = AF[3].x = job->pageBox.UR.x; - AF[1].y = AF[2].y = job->pageBox.UR.y; - AF[3].y = AF[0].y = job->pageBox.LL.y; + /* need to make background rectangle bigger than the page + * otherwise black dots show up from the antialising of the edge + * in bitmap outputs */ + AF[0].x = AF[1].x = job->pageBox.LL.x - 1; + AF[2].x = AF[3].x = job->pageBox.UR.x + 1; + AF[3].y = AF[0].y = job->pageBox.LL.y - 1; + AF[1].y = AF[2].y = job->pageBox.UR.y + 1; for (i = 0; i < 4; i++) { PF2P(AF[i],A[i]); }