From 35181e818efdc219a8fccf8479a73fa2b5db640f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 24 Feb 2016 13:03:01 +0100 Subject: Clarify scissor argument to clip device functions. The scissor argument is an optional (potentially NULL) rectangle that can give hints to devices about the area that can be scissored. This is used by the draw device and display list device to minimize the size of temporary clip mask buffers. The scissor rectangle, if used, must have been transformed by the current transform matrix. --- source/fitz/trace-device.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'source/fitz/trace-device.c') diff --git a/source/fitz/trace-device.c b/source/fitz/trace-device.c index d93906e0..4d1e5b9b 100644 --- a/source/fitz/trace-device.c +++ b/source/fitz/trace-device.c @@ -163,7 +163,7 @@ fz_trace_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const } static void -fz_trace_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_rect *rect, int even_odd, const fz_matrix *ctm) +fz_trace_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm, const fz_rect *scissor) { fz_output *out = ((fz_trace_device*)dev)->out; fz_printf(ctx, out, "\n", rect->x0, rect->y0, rect->x1, rect->y1); - else - fz_printf(ctx, out, ">\n"); + fz_printf(ctx, out, ">\n"); fz_trace_path(ctx, out, path); fz_printf(ctx, out, "\n"); } static void -fz_trace_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_rect *rect, const fz_stroke_state *stroke, const fz_matrix *ctm) +fz_trace_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm, const fz_rect *scissor) { fz_output *out = ((fz_trace_device*)dev)->out; fz_printf(ctx, out, "out; fz_printf(ctx, out, "