diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-01 03:50:43 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-01 03:50:43 +0200 |
commit | 5a18d4874159ba759863a3dc29ef11fcd23924f9 (patch) | |
tree | 1783453f00a246e3d101f0148480a96ceee7016e /draw | |
parent | 7c6ae0b110d0a29558305878482023ad7e8a66dc (diff) | |
download | mupdf-5a18d4874159ba759863a3dc29ef11fcd23924f9.tar.xz |
xps: Use opacity masks, and draw gradients with opacity.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/meshdraw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/draw/meshdraw.c b/draw/meshdraw.c index 80b80378..71c0bdb7 100644 --- a/draw/meshdraw.c +++ b/draw/meshdraw.c @@ -540,6 +540,7 @@ fz_paintshade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) fz_convertcolor(shade->cs, shade->function[i], dest->colorspace, color); for (k = 0; k < dest->colorspace->n; k++) clut[i][k] = color[k] * 255; + clut[i][k] = shade->function[i][shade->cs->n] * 255; } conv = fz_newpixmapwithrect(dest->colorspace, bbox); temp = fz_newpixmapwithrect(fz_devicegray, bbox); @@ -565,7 +566,7 @@ fz_paintshade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) while (len--) { int v = *s++; - int a = *s++; + int a = fz_mul255(*s++, clut[v][conv->n - 1]); for (k = 0; k < conv->n - 1; k++) *d++ = fz_mul255(clut[v][k], a); *d++ = a; |