diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-10-10 15:32:52 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-10-10 15:34:48 +0100 |
commit | 28eaceb5d066eb59203e647ee91febbc730f344a (patch) | |
tree | b7df2426982de7ad734b009160b1f89f6d3dfd77 /source/fitz | |
parent | 68edf38e5878799208867546c35c8679d19a3030 (diff) | |
download | mupdf-28eaceb5d066eb59203e647ee91febbc730f344a.tar.xz |
SVG: Fix fts_01_0106.pdf
A gradient fill that doesn't fill the bbox should be see through
(unless background color is set, but we'll worry about that case
when I find an example file that uses it). Arrange for the pixmap
we draw the gradient fill into to be transparent initially.
Also ensure that when we convert to png we preserve transparency.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/pixmap.c | 2 | ||||
-rw-r--r-- | source/fitz/svg-device.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c index 3f580c9e..a7cc8632 100644 --- a/source/fitz/pixmap.c +++ b/source/fitz/pixmap.c @@ -830,7 +830,7 @@ png_from_pixmap(fz_context *ctx, fz_pixmap *pix, int drop) } buf = fz_new_buffer(ctx, 1024); out = fz_new_output_with_buffer(ctx, buf); - fz_output_png(out, pix, 0); + fz_output_png(out, pix, 1); } fz_always(ctx) { diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index 33123c1b..d0efc261 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -731,6 +731,7 @@ svg_dev_fill_shade(fz_device *dev, fz_shade *shade, const fz_matrix *ctm, float else fz_round_rect(&bbox, fz_intersect_rect(fz_bound_shade(ctx, shade, ctm, &rect), &dev->scissor[dev->scissor_len-1])); pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), &bbox); + fz_clear_pixmap(ctx, pix); fz_try(ctx) { |