From fc2330c7f38d829f770f35cf9b41d381647d1b38 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 20 Oct 2010 23:59:06 +0000 Subject: Pre-multiply colors when converting the rendered grayscale shading to color via its function lookup table. --- draw/meshdraw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draw/meshdraw.c b/draw/meshdraw.c index 61b678ab..b5880ddf 100644 --- a/draw/meshdraw.c +++ b/draw/meshdraw.c @@ -374,9 +374,10 @@ fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) while (len--) { int v = *s++; + int a = *s++; for (k = 0; k < conv->n - 1; k++) - *d++ = clut[v][k]; - *d++ = *s++; + *d++ = fz_mul255(clut[v][k], a); + *d++ = a; } fz_paintpixmap(dest, conv, 255); fz_droppixmap(conv); -- cgit v1.2.3