summaryrefslogtreecommitdiff
path: root/source/fitz/trace-device.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-02-24 13:03:01 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-02-24 13:03:01 +0100
commit35181e818efdc219a8fccf8479a73fa2b5db640f (patch)
tree111f0cf83b3c06e6d6992f95bc3f09a0c132e435 /source/fitz/trace-device.c
parent7fd83ca9b3c58bc3156611e2ad9349be9ef94718 (diff)
downloadmupdf-35181e818efdc219a8fccf8479a73fa2b5db640f.tar.xz
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.
Diffstat (limited to 'source/fitz/trace-device.c')
-rw-r--r--source/fitz/trace-device.c11
1 files changed, 4 insertions, 7 deletions
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, "<clip_path");
@@ -172,16 +172,13 @@ fz_trace_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, const f
else
fz_printf(ctx, out, " winding=\"nonzero\"");
fz_trace_matrix(ctx, out, ctm);
- if (rect)
- fz_printf(ctx, out, " contentbbox=\"%g %g %g %g\">\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, "</clip_path>\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, "<clip_stroke_path");
@@ -282,7 +279,7 @@ fz_trace_fill_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const
}
static void
-fz_trace_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const fz_rect *rect, const fz_matrix *ctm)
+fz_trace_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const fz_matrix *ctm, const fz_rect *scissor)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<clip_image_mask");