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/xps/xps-path.c | 6 +++--- source/xps/xps-tile.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/xps') diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c index de078251..81545720 100644 --- a/source/xps/xps-path.c +++ b/source/xps/xps-path.c @@ -762,7 +762,7 @@ xps_clip(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, xps_resource path = xps_parse_path_geometry(ctx, doc, dict, clip_tag, 0, &fill_rule); else path = fz_new_path(ctx); - fz_clip_path(ctx, dev, path, NULL, fill_rule == 0, ctm); + fz_clip_path(ctx, dev, path, fill_rule == 0, ctm, NULL); fz_drop_path(ctx, path); } @@ -1002,7 +1002,7 @@ xps_parse_path(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, char *b if (fill_tag) { - fz_clip_path(ctx, dev, path, &area, fill_rule == 0, &local_ctm); + fz_clip_path(ctx, dev, path, fill_rule == 0, &local_ctm, &area); xps_parse_brush(ctx, doc, &local_ctm, &area, fill_uri, dict, fill_tag); fz_pop_clip(ctx, dev); } @@ -1020,7 +1020,7 @@ xps_parse_path(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, char *b if (stroke_tag) { - fz_clip_stroke_path(ctx, dev, stroke_path, &area, stroke, &local_ctm); + fz_clip_stroke_path(ctx, dev, stroke_path, stroke, &local_ctm, &area); xps_parse_brush(ctx, doc, &local_ctm, &area, stroke_uri, dict, stroke_tag); fz_pop_clip(ctx, dev); } diff --git a/source/xps/xps-tile.c b/source/xps/xps-tile.c index 6cecd9c0..31373ba3 100644 --- a/source/xps/xps-tile.c +++ b/source/xps/xps-tile.c @@ -29,7 +29,7 @@ xps_paint_tiling_brush_clipped(fz_context *ctx, xps_document *doc, const fz_matr fz_lineto(ctx, path, viewbox->x1, viewbox->y1); fz_lineto(ctx, path, viewbox->x1, viewbox->y0); fz_closepath(ctx, path); - fz_clip_path(ctx, dev, path, NULL, 0, ctm); + fz_clip_path(ctx, dev, path, 0, ctm, NULL); fz_drop_path(ctx, path); c->func(ctx, doc, ctm, viewbox, c->base_uri, c->dict, c->root, c->user); fz_pop_clip(ctx, dev); -- cgit v1.2.3