From ea7403b4c172338dfe7f371302f82859921e60af Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 29 Jun 2018 16:46:17 +0200 Subject: Pass matrices by value: device and document interface. --- source/fitz/bbox-device.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'source/fitz/bbox-device.c') diff --git a/source/fitz/bbox-device.c b/source/fitz/bbox-device.c index 7238936a..9492a2da 100644 --- a/source/fitz/bbox-device.c +++ b/source/fitz/bbox-device.c @@ -35,80 +35,80 @@ fz_bbox_add_rect(fz_context *ctx, fz_device *dev, fz_rect rect, int clip) } static void -fz_bbox_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm, +fz_bbox_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, NULL, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, NULL, ctm), 0); } static void fz_bbox_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, - const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) + fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, stroke, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, stroke, ctm), 0); } static void -fz_bbox_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm, +fz_bbox_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, NULL, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, NULL, ctm), 0); } static void fz_bbox_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, - const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) + fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, stroke, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, stroke, ctm), 0); } static void -fz_bbox_fill_shade(fz_context *ctx, fz_device *dev, fz_shade *shade, const fz_matrix *ctm, float alpha, const fz_color_params *color_params) +fz_bbox_fill_shade(fz_context *ctx, fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_bound_shade(ctx, shade, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_bound_shade(ctx, shade, ctm), 0); } static void -fz_bbox_fill_image(fz_context *ctx, fz_device *dev, fz_image *image, const fz_matrix *ctm, float alpha, const fz_color_params *color_params) +fz_bbox_fill_image(fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, ctm), 0); } static void -fz_bbox_fill_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const fz_matrix *ctm, +fz_bbox_fill_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, fz_colorspace *colorspace, const float *color, float alpha, const fz_color_params *color_params) { - fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, ctm), 0); } static void -fz_bbox_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm, const fz_rect *scissor) +fz_bbox_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, fz_matrix ctm, const fz_rect *scissor) { - fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, NULL, *ctm), 1); + fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, NULL, ctm), 1); } static void -fz_bbox_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_bbox_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, fz_matrix ctm, const fz_rect *scissor) { - fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, stroke, *ctm), 1); + fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, stroke, ctm), 1); } static void -fz_bbox_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm, const fz_rect *scissor) +fz_bbox_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, const fz_rect *scissor) { - fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, NULL, *ctm), 1); + fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, NULL, ctm), 1); } static void -fz_bbox_clip_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm, const fz_rect *scissor) +fz_bbox_clip_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, fz_matrix ctm, const fz_rect *scissor) { - fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, stroke, *ctm), 1); + fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, stroke, ctm), 1); } static void -fz_bbox_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const fz_matrix *ctm, const fz_rect *scissor) +fz_bbox_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, const fz_rect *scissor) { - fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, *ctm), 1); + fz_bbox_add_rect(ctx, dev, fz_transform_rect(fz_unit_rect, ctm), 1); } static void @@ -150,10 +150,10 @@ fz_bbox_end_group(fz_context *ctx, fz_device *dev) } static int -fz_bbox_begin_tile(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz_rect *view, float xstep, float ystep, const fz_matrix *ctm, int id) +fz_bbox_begin_tile(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz_rect *view, float xstep, float ystep, fz_matrix ctm, int id) { fz_bbox_device *bdev = (fz_bbox_device*)dev; - fz_bbox_add_rect(ctx, dev, fz_transform_rect(*area, *ctm), 0); + fz_bbox_add_rect(ctx, dev, fz_transform_rect(*area, ctm), 0); bdev->ignore++; return 0; } -- cgit v1.2.3