diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-10-11 14:27:02 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-10-11 14:28:45 +0100 |
commit | f9dd37a534b2481a9df298bbc75c63f744ddd5df (patch) | |
tree | fc26b6105e5e3d0f42e018a6294e426f9aa152be /source/fitz/svg-device.c | |
parent | d685bb8158fc7cd7bfd322e1e0943f785f3be036 (diff) | |
download | mupdf-f9dd37a534b2481a9df298bbc75c63f744ddd5df.tar.xz |
SVG: Fix clip stack handling etc.
fts_09_0919.pdf shows up some silly mistakes in the clip stack handling
and in the handling of 0 sized pixmaps. Simple fixes.
Diffstat (limited to 'source/fitz/svg-device.c')
-rw-r--r-- | source/fitz/svg-device.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index d0efc261..6f3923ca 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -726,10 +726,9 @@ svg_dev_fill_shade(fz_device *dev, fz_shade *shade, const fz_matrix *ctm, float if (dev->scissor_len == 0) return; - if (fz_is_infinite_rect(&shade->bbox)) - fz_round_rect(&bbox, &dev->scissor[dev->scissor_len-1]); - else - fz_round_rect(&bbox, fz_intersect_rect(fz_bound_shade(ctx, shade, ctm, &rect), &dev->scissor[dev->scissor_len-1])); + fz_round_rect(&bbox, fz_intersect_rect(fz_bound_shade(ctx, shade, ctm, &rect), &dev->scissor[dev->scissor_len-1])); + if (fz_is_empty_irect(&bbox)) + return; pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), &bbox); fz_clear_pixmap(ctx, pix); |