From 5c276e31cb6d65b6f2c24624c63749aa412a0bce Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 13 Sep 2018 19:23:18 +0800 Subject: Bug 699750: Check for overprinting correctly. --- source/fitz/draw-affine.c | 2 +- source/fitz/draw-device.c | 2 +- source/fitz/draw-paint.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/fitz/draw-affine.c b/source/fitz/draw-affine.c index 14383612..dc64c481 100644 --- a/source/fitz/draw-affine.c +++ b/source/fitz/draw-affine.c @@ -3991,7 +3991,7 @@ fz_paint_image_imp(fz_pixmap *dst, const fz_irect *scissor, fz_pixmap *shape, fz } #if FZ_PLOTTERS_RGB - if (dn == 3 && img->n == 1 + sa && !color && eop == NULL) + if (dn == 3 && img->n == 1 + sa && !color && !fz_overprint_required(eop)) { if (dolerp) paintfn = fz_paint_affine_g2rgb_lerp(da, sa, fa, fb, dn, alpha); diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 1bfb9577..92c9e5cd 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -1486,7 +1486,7 @@ fz_draw_fill_shade(fz_context *ctx, fz_device *devp, fz_shade *shade, fz_matrix eop = resolve_color(ctx, &op, shade->background, colorspace, alpha, cp, colorbv, state->dest); n = dest->n; - if (eop) + if (fz_overprint_required(eop)) { for (y = scissor.y0; y < scissor.y1; y++) { diff --git a/source/fitz/draw-paint.c b/source/fitz/draw-paint.c index 027fe538..72ac2de0 100644 --- a/source/fitz/draw-paint.c +++ b/source/fitz/draw-paint.c @@ -2766,7 +2766,7 @@ fz_paint_glyph(const unsigned char * FZ_RESTRICT colorbv, fz_pixmap * FZ_RESTRIC } else { - assert(dst->alpha && dst->n == 1 && dst->colorspace == NULL && eop == 0); + assert(dst->alpha && dst->n == 1 && dst->colorspace == NULL && !fz_overprint_required(eop)); fz_paint_glyph_mask(dst->stride, dp, dst->alpha, glyph, w, h, skip_x, skip_y); } } -- cgit v1.2.3