diff options
Diffstat (limited to 'source/tools')
-rw-r--r-- | source/tools/muconvert.c | 2 | ||||
-rw-r--r-- | source/tools/mudraw.c | 18 | ||||
-rw-r--r-- | source/tools/muraster.c | 2 | ||||
-rw-r--r-- | source/tools/murun.c | 46 | ||||
-rw-r--r-- | source/tools/mutrace.c | 2 | ||||
-rw-r--r-- | source/tools/pdfposter.c | 26 |
6 files changed, 48 insertions, 48 deletions
diff --git a/source/tools/muconvert.c b/source/tools/muconvert.c index e68a77c7..4a0e99de 100644 --- a/source/tools/muconvert.c +++ b/source/tools/muconvert.c @@ -76,7 +76,7 @@ static void runpage(int number) fz_try(ctx) { mediabox = fz_bound_page(ctx, page); - dev = fz_begin_page(ctx, out, &mediabox); + dev = fz_begin_page(ctx, out, mediabox); fz_run_page(ctx, page, dev, fz_identity, NULL); } fz_always(ctx) diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 828db0d0..cbd605b7 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -461,7 +461,7 @@ file_level_trailers(fz_context *ctx) } -static void drawband(fz_context *ctx, fz_page *page, fz_display_list *list, fz_matrix ctm, const fz_rect *tbounds, fz_cookie *cookie, int band_start, fz_pixmap *pix, fz_bitmap **bit) +static void drawband(fz_context *ctx, fz_page *page, fz_display_list *list, fz_matrix ctm, fz_rect tbounds, fz_cookie *cookie, int band_start, fz_pixmap *pix, fz_bitmap **bit) { fz_device *dev = NULL; @@ -538,7 +538,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in if (lowmemory) fz_enable_device_hints(ctx, dev, FZ_NO_CACHE); if (list) - fz_run_display_list(ctx, list, dev, fz_identity, &fz_infinite_rect, cookie); + fz_run_display_list(ctx, list, dev, fz_identity, fz_infinite_rect, cookie); else fz_run_page(ctx, page, dev, fz_identity, cookie); fz_write_printf(ctx, out, "</page>\n"); @@ -578,7 +578,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in if (lowmemory) fz_enable_device_hints(ctx, dev, FZ_NO_CACHE); if (list) - fz_run_display_list(ctx, list, dev, ctm, &fz_infinite_rect, cookie); + fz_run_display_list(ctx, list, dev, ctm, fz_infinite_rect, cookie); else fz_run_page(ctx, page, dev, ctm, cookie); fz_close_device(ctx, dev); @@ -629,9 +629,9 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in { pdf_obj *page_obj; - dev = pdf_page_write(ctx, pdfout, &mediabox, &resources, &contents); + dev = pdf_page_write(ctx, pdfout, mediabox, &resources, &contents); if (list) - fz_run_display_list(ctx, list, dev, fz_identity, NULL, cookie); + fz_run_display_list(ctx, list, dev, fz_identity, fz_infinite_rect, cookie); else fz_run_page(ctx, page, dev, fz_identity, cookie); fz_close_device(ctx, dev); @@ -686,7 +686,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in if (lowmemory) fz_enable_device_hints(ctx, dev, FZ_NO_CACHE); if (list) - fz_run_display_list(ctx, list, dev, ctm, &tbounds, cookie); + fz_run_display_list(ctx, list, dev, ctm, tbounds, cookie); else fz_run_page(ctx, page, dev, ctm, cookie); fz_close_device(ctx, dev); @@ -880,7 +880,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in cookie->errors += w->cookie.errors; } else - drawband(ctx, page, list, ctm, &tbounds, cookie, band * band_height, pix, &bit); + drawband(ctx, page, list, ctm, tbounds, cookie, band * band_height, pix, &bit); if (output) { @@ -1115,7 +1115,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) fz_try(ctx) { if (list) - fz_run_display_list(ctx, list, dev, fz_identity, &fz_infinite_rect, NULL); + fz_run_display_list(ctx, list, dev, fz_identity, fz_infinite_rect, NULL); else fz_run_page(ctx, page, dev, fz_identity, &cookie); fz_close_device(ctx, dev); @@ -1314,7 +1314,7 @@ static void worker_thread(void *arg) mu_wait_semaphore(&me->start); DEBUG_THREADS(("Worker %d woken for band %d\n", me->num, me->band)); if (me->band >= 0) - drawband(me->ctx, NULL, me->list, me->ctm, &me->tbounds, &me->cookie, me->band * band_height, me->pix, &me->bit); + drawband(me->ctx, NULL, me->list, me->ctm, me->tbounds, &me->cookie, me->band * band_height, me->pix, &me->bit); DEBUG_THREADS(("Worker %d completed band %d\n", me->num, me->band)); mu_trigger_semaphore(&me->stop); } diff --git a/source/tools/muraster.c b/source/tools/muraster.c index 71e8dead..628229ae 100644 --- a/source/tools/muraster.c +++ b/source/tools/muraster.c @@ -522,7 +522,7 @@ static int gettime(void) return (now.tv_sec - first.tv_sec) * 1000 + (now.tv_usec - first.tv_usec) / 1000; } -static int drawband(fz_context *ctx, fz_page *page, fz_display_list *list, fz_matrix ctm, const fz_rect *tbounds, fz_cookie *cookie, int band_start, fz_pixmap *pix, fz_bitmap **bit) +static int drawband(fz_context *ctx, fz_page *page, fz_display_list *list, fz_matrix ctm, fz_rect tbounds, fz_cookie *cookie, int band_start, fz_pixmap *pix, fz_bitmap **bit) { fz_device *dev = NULL; diff --git a/source/tools/murun.c b/source/tools/murun.c index b2a12484..c6ad673f 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -835,7 +835,7 @@ js_dev_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_ static void js_dev_clip_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, fz_matrix ctm, - const fz_rect *scissor) + fz_rect scissor) { js_State *J = ((js_device*)dev)->J; if (js_try(J)) @@ -874,7 +874,7 @@ js_dev_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, static void js_dev_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_matrix ctm, fz_rect scissor) { js_State *J = ((js_device*)dev)->J; if (js_try(J)) @@ -930,7 +930,7 @@ js_dev_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const f } static void -js_dev_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, const fz_rect *scissor) +js_dev_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix ctm, fz_rect scissor) { js_State *J = ((js_device*)dev)->J; if (js_try(J)) @@ -947,7 +947,7 @@ js_dev_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matrix static void js_dev_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_matrix ctm, fz_rect scissor) { js_State *J = ((js_device*)dev)->J; if (js_try(J)) @@ -1035,7 +1035,7 @@ js_dev_fill_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, fz_matr } static void -js_dev_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, const fz_rect *scissor) +js_dev_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, fz_matrix ctm, fz_rect scissor) { js_State *J = ((js_device*)dev)->J; if (js_try(J)) @@ -1065,7 +1065,7 @@ js_dev_pop_clip(fz_context *ctx, fz_device *dev) } static void -js_dev_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int luminosity, +js_dev_begin_mask(fz_context *ctx, fz_device *dev, fz_rect bbox, int luminosity, fz_colorspace *colorspace, const float *color, const fz_color_params *color_params) { js_State *J = ((js_device*)dev)->J; @@ -1073,7 +1073,7 @@ js_dev_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int lumi rethrow_as_fz(J); if (js_hasproperty(J, -1, "beginMask")) { js_copy(J, -2); - ffi_pushrect(J, *bbox); + ffi_pushrect(J, bbox); js_pushboolean(J, luminosity); ffi_pushcolor(J, colorspace, color, 1); ffi_pushcolorparams(J, color_params); @@ -1098,7 +1098,7 @@ js_dev_end_mask(fz_context *ctx, fz_device *dev) } static void -js_dev_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *bbox, +js_dev_begin_group(fz_context *ctx, fz_device *dev, fz_rect bbox, fz_colorspace *cs, int isolated, int knockout, int blendmode, float alpha) { js_State *J = ((js_device*)dev)->J; @@ -1106,7 +1106,7 @@ js_dev_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *bbox, rethrow_as_fz(J); if (js_hasproperty(J, -1, "beginGroup")) { js_copy(J, -2); - ffi_pushrect(J, *bbox); + ffi_pushrect(J, bbox); js_pushboolean(J, isolated); js_pushboolean(J, knockout); js_pushliteral(J, fz_blendmode_name(blendmode)); @@ -1132,7 +1132,7 @@ js_dev_end_group(fz_context *ctx, fz_device *dev) } static int -js_dev_begin_tile(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz_rect *view, +js_dev_begin_tile(fz_context *ctx, fz_device *dev, fz_rect area, fz_rect view, float xstep, float ystep, fz_matrix ctm, int id) { js_State *J = ((js_device*)dev)->J; @@ -1141,8 +1141,8 @@ js_dev_begin_tile(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz if (js_hasproperty(J, -1, "beginTile")) { int n; js_copy(J, -2); - ffi_pushrect(J, *area); - ffi_pushrect(J, *view); + ffi_pushrect(J, area); + ffi_pushrect(J, view); js_pushnumber(J, xstep); js_pushnumber(J, ystep); ffi_pushmatrix(J, ctm); @@ -1286,7 +1286,7 @@ static void ffi_Device_clipPath(js_State *J) int even_odd = js_toboolean(J, 2); fz_matrix ctm = ffi_tomatrix(J, 3); fz_try(ctx) - fz_clip_path(ctx, dev, path, even_odd, ctm, NULL); + fz_clip_path(ctx, dev, path, even_odd, ctm, fz_infinite_rect); fz_catch(ctx) rethrow(J); } @@ -1299,7 +1299,7 @@ static void ffi_Device_clipStrokePath(js_State *J) fz_stroke_state stroke = ffi_tostroke(J, 2); fz_matrix ctm = ffi_tomatrix(J, 3); fz_try(ctx) - fz_clip_stroke_path(ctx, dev, path, &stroke, ctm, NULL); + fz_clip_stroke_path(ctx, dev, path, &stroke, ctm, fz_infinite_rect); fz_catch(ctx) rethrow(J); } @@ -1340,7 +1340,7 @@ static void ffi_Device_clipText(js_State *J) fz_text *text = js_touserdata(J, 1, "fz_text"); fz_matrix ctm = ffi_tomatrix(J, 2); fz_try(ctx) - fz_clip_text(ctx, dev, text, ctm, NULL); + fz_clip_text(ctx, dev, text, ctm, fz_infinite_rect); fz_catch(ctx) rethrow(J); } @@ -1353,7 +1353,7 @@ static void ffi_Device_clipStrokeText(js_State *J) fz_stroke_state stroke = ffi_tostroke(J, 2); fz_matrix ctm = ffi_tomatrix(J, 3); fz_try(ctx) - fz_clip_stroke_text(ctx, dev, text, &stroke, ctm, NULL); + fz_clip_stroke_text(ctx, dev, text, &stroke, ctm, fz_infinite_rect); fz_catch(ctx) rethrow(J); } @@ -1419,7 +1419,7 @@ static void ffi_Device_clipImageMask(js_State *J) fz_image *image = js_touserdata(J, 1, "fz_image"); fz_matrix ctm = ffi_tomatrix(J, 2); fz_try(ctx) - fz_clip_image_mask(ctx, dev, image, ctm, NULL); + fz_clip_image_mask(ctx, dev, image, ctm, fz_infinite_rect); fz_catch(ctx) rethrow(J); } @@ -1443,7 +1443,7 @@ static void ffi_Device_beginMask(js_State *J) struct color c = ffi_tocolor(J, 3); fz_color_params *color_params = ffi_tocolorparams(J, 6); fz_try(ctx) - fz_begin_mask(ctx, dev, &area, luminosity, c.colorspace, c.color, color_params); + fz_begin_mask(ctx, dev, area, luminosity, c.colorspace, c.color, color_params); fz_catch(ctx) rethrow(J); } @@ -1468,7 +1468,7 @@ static void ffi_Device_beginGroup(js_State *J) int blendmode = fz_lookup_blendmode(js_tostring(J, 4)); float alpha = js_tonumber(J, 5); fz_try(ctx) - fz_begin_group(ctx, dev, &area, NULL, isolated, knockout, blendmode, alpha); + fz_begin_group(ctx, dev, area, NULL, isolated, knockout, blendmode, alpha); fz_catch(ctx) rethrow(J); } @@ -1495,7 +1495,7 @@ static void ffi_Device_beginTile(js_State *J) int id = js_tonumber(J, 6); int n = 0; fz_try(ctx) - n = fz_begin_tile_id(ctx, dev, &area, &view, xstep, ystep, ctm, id); + n = fz_begin_tile_id(ctx, dev, area, view, xstep, ystep, ctm, id); fz_catch(ctx) rethrow(J); js_pushnumber(J, n); @@ -2731,14 +2731,14 @@ static void ffi_DisplayList_run(js_State *J) if (js_isuserdata(J, 1, "fz_device")) { device = js_touserdata(J, 1, "fz_device"); fz_try(ctx) - fz_run_display_list(ctx, list, device, ctm, NULL, NULL); + fz_run_display_list(ctx, list, device, ctm, fz_infinite_rect, NULL); fz_catch(ctx) rethrow(J); } else { device = new_js_device(ctx, J); js_copy(J, 1); fz_try(ctx) { - fz_run_display_list(ctx, list, device, ctm, NULL, NULL); + fz_run_display_list(ctx, list, device, ctm, fz_infinite_rect, NULL); fz_close_device(ctx, device); } fz_always(ctx) @@ -2923,7 +2923,7 @@ static void ffi_DocumentWriter_beginPage(js_State *J) fz_device *device = NULL; fz_try(ctx) - device = fz_begin_page(ctx, wri, &mediabox); + device = fz_begin_page(ctx, wri, mediabox); fz_catch(ctx) rethrow(J); diff --git a/source/tools/mutrace.c b/source/tools/mutrace.c index c9e988b9..5d179b36 100644 --- a/source/tools/mutrace.c +++ b/source/tools/mutrace.c @@ -51,7 +51,7 @@ static void runpage(fz_context *ctx, fz_document *doc, int number) if (use_display_list) { list = fz_new_display_list_from_page(ctx, page); - fz_run_display_list(ctx, list, dev, fz_identity, NULL, NULL); + fz_run_display_list(ctx, list, dev, fz_identity, fz_infinite_rect, NULL); } else { diff --git a/source/tools/pdfposter.c b/source/tools/pdfposter.c index 387d8cae..1ec70460 100644 --- a/source/tools/pdfposter.c +++ b/source/tools/pdfposter.c @@ -23,7 +23,7 @@ static void usage(void) } static void -intersect_box(fz_context *ctx, pdf_document *doc, pdf_obj *page, pdf_obj *box_name, const fz_rect *mb) +intersect_box(fz_context *ctx, pdf_document *doc, pdf_obj *page, pdf_obj *box_name, fz_rect mb) { pdf_obj *box = pdf_dict_get(ctx, page, box_name); pdf_obj *newbox; @@ -37,14 +37,14 @@ intersect_box(fz_context *ctx, pdf_document *doc, pdf_obj *page, pdf_obj *box_na old_rect.x1 = pdf_array_get_real(ctx, box, 2); old_rect.y1 = pdf_array_get_real(ctx, box, 3); - if (old_rect.x0 < mb->x0) - old_rect.x0 = mb->x0; - if (old_rect.y0 < mb->y0) - old_rect.y0 = mb->y0; - if (old_rect.x1 > mb->x1) - old_rect.x1 = mb->x1; - if (old_rect.y1 > mb->y1) - old_rect.y1 = mb->y1; + if (old_rect.x0 < mb.x0) + old_rect.x0 = mb.x0; + if (old_rect.y0 < mb.y0) + old_rect.y0 = mb.y0; + if (old_rect.x1 > mb.x1) + old_rect.x1 = mb.x1; + if (old_rect.y1 > mb.y1) + old_rect.y1 = mb.y1; newbox = pdf_new_array(ctx, doc, 4); pdf_array_push_real(ctx, newbox, old_rect.x0); @@ -139,10 +139,10 @@ static void decimatepages(fz_context *ctx, pdf_document *doc) pdf_dict_put(ctx, newpageobj, PDF_NAME(Parent), pages); pdf_dict_put_drop(ctx, newpageobj, PDF_NAME(MediaBox), newmediabox); - intersect_box(ctx, doc, newpageobj, PDF_NAME(CropBox), &mb); - intersect_box(ctx, doc, newpageobj, PDF_NAME(BleedBox), &mb); - intersect_box(ctx, doc, newpageobj, PDF_NAME(TrimBox), &mb); - intersect_box(ctx, doc, newpageobj, PDF_NAME(ArtBox), &mb); + intersect_box(ctx, doc, newpageobj, PDF_NAME(CropBox), mb); + intersect_box(ctx, doc, newpageobj, PDF_NAME(BleedBox), mb); + intersect_box(ctx, doc, newpageobj, PDF_NAME(TrimBox), mb); + intersect_box(ctx, doc, newpageobj, PDF_NAME(ArtBox), mb); /* Store page object in new kids array */ pdf_drop_obj(ctx, newpageobj); |