diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-06-29 16:46:17 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 15:32:34 +0200 |
commit | ea7403b4c172338dfe7f371302f82859921e60af (patch) | |
tree | 4a3fbf8ea35cb53fcbf395f096cf61ffda7b40be /include/mupdf/pdf | |
parent | 4a99615a609eec2b84bb2341d74fac46a5998137 (diff) | |
download | mupdf-ea7403b4c172338dfe7f371302f82859921e60af.tar.xz |
Pass matrices by value: device and document interface.
Diffstat (limited to 'include/mupdf/pdf')
-rw-r--r-- | include/mupdf/pdf/annot.h | 4 | ||||
-rw-r--r-- | include/mupdf/pdf/font.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/interpret.h | 6 | ||||
-rw-r--r-- | include/mupdf/pdf/output-pdf.h | 2 | ||||
-rw-r--r-- | include/mupdf/pdf/page.h | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 1e9361fd..5a97c4d5 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -106,7 +106,7 @@ int pdf_annot_type(fz_context *ctx, pdf_annot *annot); ctm: A transformation matrix applied to the objects on the page, e.g. to scale or rotate the page contents as desired. */ -void pdf_run_annot(fz_context *ctx, pdf_annot *annot, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); +void pdf_run_annot(fz_context *ctx, pdf_annot *annot, fz_device *dev, fz_matrix ctm, fz_cookie *cookie); struct pdf_annot_s { @@ -130,7 +130,7 @@ pdf_obj *pdf_lookup_name(fz_context *ctx, pdf_document *doc, pdf_obj *which, pdf pdf_obj *pdf_load_name_tree(fz_context *ctx, pdf_document *doc, pdf_obj *which); int pdf_resolve_link(fz_context *ctx, pdf_document *doc, const char *uri, float *xp, float *yp); -fz_link *pdf_load_link_annots(fz_context *ctx, pdf_document *, pdf_obj *annots, int pagenum, const fz_matrix *page_ctm); +fz_link *pdf_load_link_annots(fz_context *ctx, pdf_document *, pdf_obj *annots, int pagenum, fz_matrix page_ctm); fz_matrix pdf_annot_transform(fz_context *ctx, pdf_annot *annot); void pdf_load_annots(fz_context *ctx, pdf_page *page, pdf_obj *annots); diff --git a/include/mupdf/pdf/font.h b/include/mupdf/pdf/font.h index ad0ca6b5..373b2b1b 100644 --- a/include/mupdf/pdf/font.h +++ b/include/mupdf/pdf/font.h @@ -128,7 +128,7 @@ void pdf_print_font(fz_context *ctx, fz_output *out, pdf_font_desc *fontdesc); fz_rect *pdf_measure_text(fz_context *ctx, pdf_font_desc *fontdesc, unsigned char *buf, size_t len, fz_rect *rect); float pdf_text_stride(fz_context *ctx, pdf_font_desc *fontdesc, float fontsize, unsigned char *buf, size_t len, float room, size_t *count); -void pdf_run_glyph(fz_context *ctx, pdf_document *doc, pdf_obj *resources, fz_buffer *contents, fz_device *dev, const fz_matrix *ctm, void *gstate, int nested_depth, fz_default_colorspaces *default_cs); +void pdf_run_glyph(fz_context *ctx, pdf_document *doc, pdf_obj *resources, fz_buffer *contents, fz_device *dev, fz_matrix ctm, void *gstate, int nested_depth, fz_default_colorspaces *default_cs); pdf_obj *pdf_add_simple_font(fz_context *ctx, pdf_document *doc, fz_font *font, int encoding); pdf_obj *pdf_add_cid_font(fz_context *ctx, pdf_document *doc, fz_font *font); diff --git a/include/mupdf/pdf/interpret.h b/include/mupdf/pdf/interpret.h index 4854caac..554ce4c7 100644 --- a/include/mupdf/pdf/interpret.h +++ b/include/mupdf/pdf/interpret.h @@ -184,7 +184,7 @@ struct pdf_csi_s 0 for an initial call, and will be incremented in nested calls due to Type 3 fonts. */ -pdf_processor *pdf_new_run_processor(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, const char *usage, pdf_gstate *gstate, int nested, fz_default_colorspaces *default_cs); +pdf_processor *pdf_new_run_processor(fz_context *ctx, fz_device *dev, fz_matrix ctm, const char *usage, pdf_gstate *gstate, int nested, fz_default_colorspaces *default_cs); /* pdf_new_buffer_processor: Create a buffer processor. This @@ -246,9 +246,9 @@ pdf_processor *pdf_new_output_processor(fz_context *ctx, fz_output *out, int ahx */ pdf_processor *pdf_new_filter_processor(fz_context *ctx, pdf_document *doc, pdf_processor *chain, pdf_obj *old_res, pdf_obj *new_res); -typedef int (pdf_text_filter_fn)(fz_context *ctx, void *opaque, int *ucsbuf, int ucslen, fz_matrix *trm, fz_rect *bbox); +typedef int (pdf_text_filter_fn)(fz_context *ctx, void *opaque, int *ucsbuf, int ucslen, fz_matrix trm, fz_rect bbox); -typedef void (pdf_after_text_object_fn)(fz_context *ctx, void *opaque, pdf_document *doc, pdf_processor *chain, const fz_matrix *ctm); +typedef void (pdf_after_text_object_fn)(fz_context *ctx, void *opaque, pdf_document *doc, pdf_processor *chain, fz_matrix ctm); /* pdf_new_filter_processor_with_text_filter: Create a filter diff --git a/include/mupdf/pdf/output-pdf.h b/include/mupdf/pdf/output-pdf.h index 6742c2e1..d223b45e 100644 --- a/include/mupdf/pdf/output-pdf.h +++ b/include/mupdf/pdf/output-pdf.h @@ -10,7 +10,7 @@ a reference to a stream). Callers should take care to ensure that it is not an array, and that is it not shared with other objects/pages. */ -fz_device *pdf_new_pdf_device(fz_context *ctx, pdf_document *doc, const fz_matrix *topctm, +fz_device *pdf_new_pdf_device(fz_context *ctx, pdf_document *doc, fz_matrix topctm, const fz_rect *mediabox, pdf_obj *resources, fz_buffer *contents); void pdf_localise_page_resources(fz_context *ctx, pdf_document *doc); diff --git a/include/mupdf/pdf/page.h b/include/mupdf/pdf/page.h index 25043b1d..3effd52b 100644 --- a/include/mupdf/pdf/page.h +++ b/include/mupdf/pdf/page.h @@ -70,7 +70,7 @@ fz_rect pdf_bound_page(fz_context *ctx, pdf_page *page); ctm: A transformation matrix applied to the objects on the page, e.g. to scale or rotate the page contents as desired. */ -void pdf_run_page(fz_context *ctx, pdf_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); +void pdf_run_page(fz_context *ctx, pdf_page *page, fz_device *dev, fz_matrix ctm, fz_cookie *cookie); /* pdf_run_page_with_usage: Interpret a loaded page and render it on a device. @@ -88,7 +88,7 @@ void pdf_run_page(fz_context *ctx, pdf_page *page, fz_device *dev, const fz_matr cookie: A pointer to an optional fz_cookie structure that can be used to track progress, collect errors etc. */ -void pdf_run_page_with_usage(fz_context *ctx, pdf_document *doc, pdf_page *page, fz_device *dev, const fz_matrix *ctm, const char *usage, fz_cookie *cookie); +void pdf_run_page_with_usage(fz_context *ctx, pdf_document *doc, pdf_page *page, fz_device *dev, fz_matrix ctm, const char *usage, fz_cookie *cookie); /* pdf_run_page_contents: Interpret a loaded page and render it on a device. @@ -101,7 +101,7 @@ void pdf_run_page_with_usage(fz_context *ctx, pdf_document *doc, pdf_page *page, ctm: A transformation matrix applied to the objects on the page, e.g. to scale or rotate the page contents as desired. */ -void pdf_run_page_contents(fz_context *ctx, pdf_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); +void pdf_run_page_contents(fz_context *ctx, pdf_page *page, fz_device *dev, fz_matrix ctm, fz_cookie *cookie); /* pdf_page_contents_process_fn: A function used for processing the |