From f9dd37a534b2481a9df298bbc75c63f744ddd5df Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 11 Oct 2013 14:27:02 +0100 Subject: 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. --- source/fitz/svg-device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/fitz/svg-device.c') 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); -- cgit v1.2.3