]> granicus.if.org Git - graphviz/commitdiff
fix wrong colored wide lines when using node images
authorellson <devnull@localhost>
Thu, 10 Sep 2009 18:30:01 +0000 (18:30 +0000)
committerellson <devnull@localhost>
Thu, 10 Sep 2009 18:30:01 +0000 (18:30 +0000)
(need to use trueColor brushes on trueColor drawings)

plugin/gd/gvrender_gd.c

index f8b2452fbd091dd93e7565161a9773b68b0d8401..f2649f5cb1870637a09f14ef5fe6e1c3372e0595 100644 (file)
@@ -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);