From: Emden Gansner Date: Thu, 5 Jul 2012 21:14:47 +0000 (-0400) Subject: Fix misspelling and allow small dividing line between stripes X-Git-Tag: LAST_LIBGRAPH~32^2~381 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85ef6de1049c5d44acc52d921742cb8a7b0bdb0b;p=graphviz Fix misspelling and allow small dividing line between stripes --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 9c351aa35..b1390b2a1 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -342,7 +342,7 @@ splitColorList (char* clist, char*** carray) } /* stripedBox: - * Fill a rectangular box with verticle stripes of colors. + * Fill a rectangular box with vertical stripes of colors. * AF gives 4 corner points, with AF[0] the LL corner and the points ordered CCW. * clrs is a list of colon separated colors. * No boundaries are drawn. @@ -355,6 +355,7 @@ stripedBox (GVJ_t * job, pointf* AF, char* clrs) double xdelta; pointf pts[4]; double lastx = AF[1].x; + int save_penwidth = job->obj->penwidth; if (numclrs < 1) numclrs = 1; xdelta = (AF[1].x - AF[0].x)/numclrs; @@ -364,15 +365,19 @@ stripedBox (GVJ_t * job, pointf* AF, char* clrs) pts[3] = AF[3]; if (numclrs > 1) pts[1].x = pts[2].x = pts[0].x + xdelta; + + gvrender_set_penwidth(job, 0.5); for (i = 0; i < numclrs; i++) { gvrender_set_fillcolor (job, (colors[i]?colors[i]:DEFAULT_COLOR)); - gvrender_polygon(job, pts, 4, FILL | NO_POLY); + /* gvrender_polygon(job, pts, 4, FILL | NO_POLY); */ + gvrender_polygon(job, pts, 4, FILL); pts[0].x = pts[3].x = pts[1].x; if (i == numclrs-2) pts[1].x = pts[2].x = lastx; else pts[1].x = pts[2].x = pts[0].x + xdelta; } + gvrender_set_penwidth(job, save_penwidth); free (colors[0]); free (colors); }