summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-10-20 23:59:06 +0000
committerTor Andersson <tor@ghostscript.com>2010-10-20 23:59:06 +0000
commitfc2330c7f38d829f770f35cf9b41d381647d1b38 (patch)
treeef5985fca5280c5ec30b8e04c836d21894a18149 /draw
parent6324164812f0952e9352fb24f8d8f1d103f52707 (diff)
downloadmupdf-fc2330c7f38d829f770f35cf9b41d381647d1b38.tar.xz
Pre-multiply colors when converting the rendered grayscale shading to color via its function lookup table.
Diffstat (limited to 'draw')
-rw-r--r--draw/meshdraw.c5
1 files 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);