From dc7588ea29a63ff3a9a37b4e9036e8fb2d1b411a Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 10 Sep 2009 18:30:01 +0000 Subject: [PATCH] fix wrong colored wide lines when using node images (need to use trueColor brushes on trueColor drawings) --- plugin/gd/gvrender_gd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin/gd/gvrender_gd.c b/plugin/gd/gvrender_gd.c index f8b2452fb..f2649f5cb 100644 --- a/plugin/gd/gvrender_gd.c +++ b/plugin/gd/gvrender_gd.c @@ -433,8 +433,13 @@ static int gdgen_set_penstyle(GVJ_t * job, gdImagePtr im, gdImagePtr brush) gdImageSetThickness(im, width); /* use brush instead of Thickness to improve end butts */ if (width != PENWIDTH_NORMAL) { - brush = gdImageCreate(width, width); - gdImagePaletteCopy(brush, im); + if (im->trueColor) { + brush = gdImageCreateTrueColor(width,width); + } + else { + brush = gdImageCreate(width, width); + gdImagePaletteCopy(brush, im); + } gdImageFilledRectangle(brush, 0, 0, width - 1, width - 1, obj->pencolor.u.index); gdImageSetBrush(im, brush); -- 2.40.0