diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-08 22:25:39 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-08 22:25:39 +0200 |
commit | 42e89d924112d0aea66245f46b8a25ab120c44da (patch) | |
tree | 094892cdaf9f1087599aa9b6bd53b052015d54a5 /draw | |
parent | ae039a6b71fb9afddd29cf289e0f9a2be23803c5 (diff) | |
download | mupdf-42e89d924112d0aea66245f46b8a25ab120c44da.tar.xz |
Simplify arguments to fz_new_pixmap.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/draw_device.c | 4 | ||||
-rw-r--r-- | draw/draw_scale.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c index fe93183d..1e011b30 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -593,7 +593,7 @@ fz_draw_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) if (image->colorspace != model && !after) { - converted = fz_new_pixmap(model, image->x, image->y, image->w, image->h); + converted = fz_new_pixmap_with_rect(model, fz_bound_pixmap(image)); fz_convert_pixmap(image, converted); image = converted; } @@ -624,7 +624,7 @@ fz_draw_fill_image(void *user, fz_pixmap *image, fz_matrix ctm, float alpha) } else { - converted = fz_new_pixmap(model, image->x, image->y, image->w, image->h); + converted = fz_new_pixmap_with_rect(model, fz_bound_pixmap(image)); fz_convert_pixmap(image, converted); image = converted; } diff --git a/draw/draw_scale.c b/draw/draw_scale.c index f66974d3..a6fb2817 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -1090,9 +1090,9 @@ fz_scale_pixmap(fz_pixmap *src, float x, float y, float w, float h) assert(contrib_cols == NULL || contrib_cols->count == dst_w_int); assert(contrib_rows == NULL || contrib_rows->count == dst_h_int); - output = fz_new_pixmap(src->colorspace, dst_x_int, dst_y_int, dst_w_int, dst_h_int); - if (output == NULL) - goto cleanup; + output = fz_new_pixmap(src->colorspace, dst_w_int, dst_h_int); + output->x = dst_x_int; + output->y = dst_y_int; /* Step 2: Apply the weights */ #ifdef SINGLE_PIXEL_SPECIALS |