diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-08-30 18:23:16 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-24 15:16:36 +0100 |
commit | 084885ab5668a716ed68093b7308b7f0beecbd54 (patch) | |
tree | 6639ddf05619313d2eaef2ecbd1789c1713a79eb /source/fitz | |
parent | 5bc368de9feb7d12c124e2d0712e2d7314420c44 (diff) | |
download | mupdf-084885ab5668a716ed68093b7308b7f0beecbd54.tar.xz |
Update blend mode debug dumps to include group backdrops.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/draw-device.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 99894ac3..f67348d5 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -254,7 +254,15 @@ fz_knockout_begin(fz_context *ctx, fz_draw_device *dev) fz_clear_pixmap(ctx, shape); } #ifdef DUMP_GROUP_BLENDS - dump_spaces(dev->top-1, "Knockout begin\n"); + dump_spaces(dev->top-1, ""); + { + char text[80]; + sprintf(text, "Knockout begin%s: background is ", isolated ? " (isolated)" : ""); + fz_dump_blend(ctx, text, dest); + } + if (shape) + fz_dump_blend(ctx, "/", shape); + printf("\n"); #endif state[1].scissor = bbox; state[1].dest = dest; @@ -2138,7 +2146,25 @@ fz_draw_begin_group(fz_context *ctx, fz_device *devp, const fz_rect *rect, fz_co state[1].alpha = alpha; #ifdef DUMP_GROUP_BLENDS - dump_spaces(dev->top-1, "Group begin\n"); + dump_spaces(dev->top-1, ""); + { + char text[240]; + char atext[80]; + char btext[80]; + if (alpha != 1) + sprintf(atext, " (alpha=%g)", alpha); + else + atext[0] = 0; + if (blendmode != 0) + sprintf(btext, " (blendmode=%d)", blendmode); + else + btext[0] = 0; + sprintf(text, "Group begin%s%s%s%s: background is ", isolated ? " (isolated)" : "", knockout ? " (knockout)" : "", atext, btext); + fz_dump_blend(ctx, text, state[1].dest); + } + if (state[1].shape) + fz_dump_blend(ctx, "/", state[1].shape); + printf("\n"); #endif state[1].scissor = bbox; |