diff options
Diffstat (limited to 'fitz/dev_bbox.c')
-rw-r--r-- | fitz/dev_bbox.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fitz/dev_bbox.c b/fitz/dev_bbox.c index 179ff030..e83cbcc5 100644 --- a/fitz/dev_bbox.c +++ b/fitz/dev_bbox.c @@ -3,70 +3,70 @@ /* TODO: add clip stack and use to intersect bboxes */ static void -fz_bbox_fill_path(void *user, fz_path *path, int even_odd, fz_matrix ctm, +fz_bbox_fill_path(fz_device *dev, fz_path *path, int even_odd, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_bound_path(path, NULL, ctm)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_stroke_path(void *user, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, +fz_bbox_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_bound_path(path, stroke, ctm)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_fill_text(void *user, fz_text *text, fz_matrix ctm, +fz_bbox_fill_text(fz_device *dev, fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_bound_text(text, ctm)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_stroke_text(void *user, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, +fz_bbox_stroke_text(fz_device *dev, fz_text *text, fz_stroke_state *stroke, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_bound_text(text, ctm)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_fill_shade(void *user, fz_shade *shade, fz_matrix ctm, float alpha) +fz_bbox_fill_shade(fz_device *dev, fz_shade *shade, fz_matrix ctm, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_bound_shade(shade, ctm)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) +fz_bbox_fill_image(fz_device *dev, fz_pixmap *image, fz_matrix ctm, float alpha) { - fz_bbox *result = user; + fz_bbox *result = dev->user; fz_bbox bbox = fz_round_rect(fz_transform_rect(ctm, fz_unit_rect)); *result = fz_union_bbox(*result, bbox); } static void -fz_bbox_fill_image_mask(void *user, fz_pixmap *image, fz_matrix ctm, +fz_bbox_fill_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { - fz_bbox_fill_image(user, image, ctm, alpha); + fz_bbox_fill_image(dev->user, image, ctm, alpha); } fz_device * -fz_new_bbox_device(fz_bbox *result) +fz_new_bbox_device(fz_context *ctx, fz_bbox *result) { fz_device *dev; - dev = fz_new_device(result); + dev = fz_new_device(ctx, result); dev->fill_path = fz_bbox_fill_path; dev->stroke_path = fz_bbox_stroke_path; |