diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-01-16 16:03:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-01-30 14:07:21 +0100 |
commit | 29f09279714f4f9b81d9b5488072860142f86f24 (patch) | |
tree | 6a26bf5f77028bb5637b1ec3430660af801688e5 /draw | |
parent | ddb92b7c3fdfcf9bf3d7463dde4e662ca10f79ba (diff) | |
download | mupdf-29f09279714f4f9b81d9b5488072860142f86f24.tar.xz |
Pass content/clip bbox to device functions by value.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/draw_device.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c index d65d4a90..196e9bdb 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -348,7 +348,7 @@ fz_draw_stroke_path(fz_device *devp, fz_path *path, fz_stroke_state *stroke, fz_ } static void -fz_draw_clip_path(fz_device *devp, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm) +fz_draw_clip_path(fz_device *devp, fz_path *path, fz_rect rect, int even_odd, fz_matrix ctm) { fz_draw_device *dev = devp->user; float expansion = fz_matrix_expansion(ctm); @@ -367,8 +367,7 @@ fz_draw_clip_path(fz_device *devp, fz_path *path, fz_rect *rect, int even_odd, f bbox = fz_bound_gel(dev->gel); bbox = fz_intersect_rect(bbox, state->scissor); - if (rect) - bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(*rect)); + bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(rect)); if (fz_is_empty_rect(bbox) || fz_is_rect_gel(dev->gel)) { @@ -407,7 +406,7 @@ fz_draw_clip_path(fz_device *devp, fz_path *path, fz_rect *rect, int even_odd, f } static void -fz_draw_clip_stroke_path(fz_device *devp, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm) +fz_draw_clip_stroke_path(fz_device *devp, fz_path *path, fz_rect rect, fz_stroke_state *stroke, fz_matrix ctm) { fz_draw_device *dev = devp->user; float expansion = fz_matrix_expansion(ctm); @@ -433,8 +432,7 @@ fz_draw_clip_stroke_path(fz_device *devp, fz_path *path, fz_rect *rect, fz_strok bbox = fz_bound_gel(dev->gel); bbox = fz_intersect_rect(bbox, state->scissor); - if (rect) - bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(*rect)); + bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(rect)); fz_try(ctx) { @@ -1213,7 +1211,7 @@ fz_draw_fill_image_mask(fz_device *devp, fz_image *image, fz_matrix ctm, } static void -fz_draw_clip_image_mask(fz_device *devp, fz_image *image, fz_rect *rect, fz_matrix ctm) +fz_draw_clip_image_mask(fz_device *devp, fz_image *image, fz_rect rect, fz_matrix ctm) { fz_draw_device *dev = devp->user; fz_context *ctx = dev->ctx; @@ -1253,8 +1251,7 @@ fz_draw_clip_image_mask(fz_device *devp, fz_image *image, fz_rect *rect, fz_matr bbox = fz_rect_covering_rect(fz_transform_rect(ctm, fz_unit_rect)); bbox = fz_intersect_rect(bbox, state->scissor); - if (rect) - bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(*rect)); + bbox = fz_intersect_rect(bbox, fz_rect_covering_rect(rect)); dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b); dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d); |