summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/cbz/mucbz.c4
-rw-r--r--source/cbz/muimg.c4
-rw-r--r--source/cbz/mutiff.c4
-rw-r--r--source/fitz/image.c6
-rw-r--r--source/fitz/output-cbz.c4
-rw-r--r--source/fitz/output-svg.c2
-rw-r--r--source/fitz/writer.c2
-rw-r--r--source/html/epub-doc.c4
-rw-r--r--source/html/html-doc.c6
-rw-r--r--source/pdf/pdf-page.c2
-rw-r--r--source/pdf/pdf-write.c2
-rw-r--r--source/pdf/pdf-xref.c2
-rw-r--r--source/svg/svg-doc.c4
-rw-r--r--source/xps/xps-doc.c2
14 files changed, 24 insertions, 24 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c
index 33aac13c..53ad5938 100644
--- a/source/cbz/mucbz.c
+++ b/source/cbz/mucbz.c
@@ -165,7 +165,7 @@ cbz_load_page(fz_context *ctx, cbz_document *doc, int number)
fz_try(ctx)
{
- page = fz_new_page(ctx, cbz_page);
+ page = fz_new_derived_page(ctx, cbz_page);
page->super.bound_page = (fz_page_bound_page_fn *)cbz_bound_page;
page->super.run_page_contents = (fz_page_run_page_contents_fn *)cbz_run_page;
page->super.drop_page = (fz_page_drop_page_fn *)cbz_drop_page;
@@ -197,7 +197,7 @@ cbz_open_document_with_stream(fz_context *ctx, fz_stream *file)
{
cbz_document *doc;
- doc = fz_new_document(ctx, cbz_document);
+ doc = fz_new_derived_document(ctx, cbz_document);
doc->super.drop_document = (fz_document_drop_fn *)cbz_drop_document;
doc->super.count_pages = (fz_document_count_pages_fn *)cbz_count_pages;
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index f985d460..5c9b84bf 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -69,7 +69,7 @@ img_load_page(fz_context *ctx, img_document *doc, int number)
if (number != 0)
return NULL;
- page = fz_new_page(ctx, img_page);
+ page = fz_new_derived_page(ctx, img_page);
page->super.bound_page = (fz_page_bound_page_fn *)img_bound_page;
page->super.run_page_contents = (fz_page_run_page_contents_fn *)img_run_page;
@@ -91,7 +91,7 @@ img_lookup_metadata(fz_context *ctx, img_document *doc, const char *key, char *b
static img_document *
img_new_document(fz_context *ctx, fz_image *image)
{
- img_document *doc = fz_new_document(ctx, img_document);
+ img_document *doc = fz_new_derived_document(ctx, img_document);
doc->super.drop_document = (fz_document_drop_fn *)img_drop_document;
doc->super.count_pages = (fz_document_count_pages_fn *)img_count_pages;
diff --git a/source/cbz/mutiff.c b/source/cbz/mutiff.c
index 4e144aba..6b7b989c 100644
--- a/source/cbz/mutiff.c
+++ b/source/cbz/mutiff.c
@@ -74,7 +74,7 @@ tiff_load_page(fz_context *ctx, tiff_document *doc, int number)
pixmap = fz_load_tiff_subimage(ctx, data, len, number);
image = fz_new_image_from_pixmap(ctx, pixmap, NULL);
- page = fz_new_page(ctx, tiff_page);
+ page = fz_new_derived_page(ctx, tiff_page);
page->super.bound_page = (fz_page_bound_page_fn *)tiff_bound_page;
page->super.run_page_contents = (fz_page_run_page_contents_fn *)tiff_run_page;
page->super.drop_page = (fz_page_drop_page_fn *)tiff_drop_page;
@@ -119,7 +119,7 @@ tiff_open_document_with_stream(fz_context *ctx, fz_stream *file)
{
tiff_document *doc;
- doc = fz_new_document(ctx, tiff_document);
+ doc = fz_new_derived_document(ctx, tiff_document);
doc->super.drop_document = (fz_document_drop_fn *)tiff_drop_document;
doc->super.count_pages = (fz_document_count_pages_fn *)tiff_count_pages;
diff --git a/source/fitz/image.c b/source/fitz/image.c
index a1d392d9..72855395 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -734,7 +734,7 @@ fz_new_image_from_pixmap(fz_context *ctx, fz_pixmap *pixmap, fz_image *mask)
{
fz_pixmap_image *image;
- image = fz_new_image(ctx, pixmap->w, pixmap->h, 8, pixmap->colorspace,
+ image = fz_new_derived_image(ctx, pixmap->w, pixmap->h, 8, pixmap->colorspace,
pixmap->xres, pixmap->yres, 0, 0,
NULL, NULL, mask, fz_pixmap_image,
pixmap_image_get_pixmap,
@@ -823,7 +823,7 @@ fz_new_image_from_compressed_buffer(fz_context *ctx, int w, int h,
fz_try(ctx)
{
- image = fz_new_image(ctx, w, h, bpc,
+ image = fz_new_derived_image(ctx, w, h, bpc,
colorspace, xres, yres,
interpolate, imagemask, decode,
colorkey, mask, fz_compressed_image,
@@ -1102,7 +1102,7 @@ fz_image *fz_new_image_from_display_list(fz_context *ctx, float w, float h, fz_d
iw = w * SCALABLE_IMAGE_DPI / 72;
ih = h * SCALABLE_IMAGE_DPI / 72;
- image = fz_new_image(ctx, iw, ih, 8, fz_device_rgb(ctx),
+ image = fz_new_derived_image(ctx, iw, ih, 8, fz_device_rgb(ctx),
SCALABLE_IMAGE_DPI, SCALABLE_IMAGE_DPI, 0, 0,
NULL, NULL, NULL, fz_display_list_image,
display_list_image_get_pixmap,
diff --git a/source/fitz/output-cbz.c b/source/fitz/output-cbz.c
index 73cc1195..0e0a0195 100644
--- a/source/fitz/output-cbz.c
+++ b/source/fitz/output-cbz.c
@@ -66,7 +66,7 @@ cbz_drop_writer(fz_context *ctx, fz_document_writer *wri_)
fz_document_writer *
fz_new_cbz_writer(fz_context *ctx, const char *path, const char *options)
{
- fz_cbz_writer *wri = fz_new_writer(ctx, fz_cbz_writer, cbz_begin_page, cbz_end_page, cbz_close_writer, cbz_drop_writer);
+ fz_cbz_writer *wri = fz_new_derived_document_writer(ctx, fz_cbz_writer, cbz_begin_page, cbz_end_page, cbz_close_writer, cbz_drop_writer);
fz_try(ctx)
{
@@ -133,7 +133,7 @@ fz_new_pixmap_writer(fz_context *ctx, const char *path, const char *options,
const char *default_path, int n,
void (*save)(fz_context *ctx, fz_pixmap *pix, const char *filename))
{
- fz_pixmap_writer *wri = fz_new_writer(ctx, fz_pixmap_writer, pixmap_begin_page, pixmap_end_page, NULL, pixmap_drop_writer);
+ fz_pixmap_writer *wri = fz_new_derived_document_writer(ctx, fz_pixmap_writer, pixmap_begin_page, pixmap_end_page, NULL, pixmap_drop_writer);
fz_try(ctx)
{
diff --git a/source/fitz/output-svg.c b/source/fitz/output-svg.c
index 0758b843..174906a2 100644
--- a/source/fitz/output-svg.c
+++ b/source/fitz/output-svg.c
@@ -59,7 +59,7 @@ fz_document_writer *
fz_new_svg_writer(fz_context *ctx, const char *path, const char *args)
{
const char *val;
- fz_svg_writer *wri = fz_new_writer(ctx, fz_svg_writer, svg_begin_page, svg_end_page, NULL, svg_drop_writer);
+ fz_svg_writer *wri = fz_new_derived_document_writer(ctx, fz_svg_writer, svg_begin_page, svg_end_page, NULL, svg_drop_writer);
wri->text_format = FZ_SVG_TEXT_AS_PATH;
wri->reuse_images = 1;
diff --git a/source/fitz/writer.c b/source/fitz/writer.c
index c89ee4e0..f9d5b8c1 100644
--- a/source/fitz/writer.c
+++ b/source/fitz/writer.c
@@ -48,7 +48,7 @@ fz_option_eq(const char *a, const char *b)
return !strncmp(a, b, n) && (a[n] == ',' || a[n] == 0);
}
-fz_document_writer *fz_new_writer_of_size(fz_context *ctx, size_t size, fz_document_writer_begin_page_fn *begin_page,
+fz_document_writer *fz_new_document_writer_of_size(fz_context *ctx, size_t size, fz_document_writer_begin_page_fn *begin_page,
fz_document_writer_end_page_fn *end_page, fz_document_writer_close_writer_fn *close, fz_document_writer_drop_writer_fn *drop)
{
fz_document_writer *wri = Memento_label(fz_calloc(ctx, 1, size), "fz_document_writer");
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
index d443dbae..441bfb83 100644
--- a/source/html/epub-doc.c
+++ b/source/html/epub-doc.c
@@ -215,7 +215,7 @@ static fz_page *
epub_load_page(fz_context *ctx, fz_document *doc_, int number)
{
epub_document *doc = (epub_document*)doc_;
- epub_page *page = fz_new_page(ctx, epub_page);
+ epub_page *page = fz_new_derived_page(ctx, epub_page);
page->super.bound_page = epub_bound_page;
page->super.run_page_contents = epub_run_page;
page->super.load_links = epub_load_links;
@@ -465,7 +465,7 @@ epub_init(fz_context *ctx, fz_archive *zip)
{
epub_document *doc;
- doc = fz_new_document(ctx, epub_document);
+ doc = fz_new_derived_document(ctx, epub_document);
doc->zip = zip;
doc->set = fz_new_html_font_set(ctx);
diff --git a/source/html/html-doc.c b/source/html/html-doc.c
index d9d7d27f..fadb6ee3 100644
--- a/source/html/html-doc.c
+++ b/source/html/html-doc.c
@@ -115,7 +115,7 @@ static fz_page *
htdoc_load_page(fz_context *ctx, fz_document *doc_, int number)
{
html_document *doc = (html_document*)doc_;
- html_page *page = fz_new_page(ctx, html_page);
+ html_page *page = fz_new_derived_page(ctx, html_page);
page->super.bound_page = htdoc_bound_page;
page->super.run_page_contents = htdoc_run_page;
page->super.load_links = htdoc_load_links;
@@ -139,7 +139,7 @@ htdoc_open_document_with_stream(fz_context *ctx, fz_stream *file)
html_document *doc;
fz_buffer *buf;
- doc = fz_new_document(ctx, html_document);
+ doc = fz_new_derived_document(ctx, html_document);
doc->super.drop_document = htdoc_drop_document;
doc->super.layout = htdoc_layout;
@@ -172,7 +172,7 @@ htdoc_open_document(fz_context *ctx, const char *filename)
fz_dirname(dirname, filename, sizeof dirname);
- doc = fz_new_document(ctx, html_document);
+ doc = fz_new_derived_document(ctx, html_document);
doc->super.drop_document = htdoc_drop_document;
doc->super.layout = htdoc_layout;
doc->super.resolve_link = htdoc_resolve_link;
diff --git a/source/pdf/pdf-page.c b/source/pdf/pdf-page.c
index 1eec063c..dc907798 100644
--- a/source/pdf/pdf-page.c
+++ b/source/pdf/pdf-page.c
@@ -649,7 +649,7 @@ pdf_drop_page_imp(fz_context *ctx, pdf_page *page)
static pdf_page *
pdf_new_page(fz_context *ctx, pdf_document *doc)
{
- pdf_page *page = fz_new_page(ctx, pdf_page);
+ pdf_page *page = fz_new_derived_page(ctx, pdf_page);
page->doc = (pdf_document*) fz_keep_document(ctx, &doc->super);
diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c
index 9af70bb4..5477fa07 100644
--- a/source/pdf/pdf-write.c
+++ b/source/pdf/pdf-write.c
@@ -3273,7 +3273,7 @@ pdf_writer_drop_writer(fz_context *ctx, fz_document_writer *wri_)
fz_document_writer *
fz_new_pdf_writer(fz_context *ctx, const char *path, const char *options)
{
- pdf_writer *wri = fz_new_writer(ctx, pdf_writer, pdf_writer_begin_page, pdf_writer_end_page, pdf_writer_close_writer, pdf_writer_drop_writer);
+ pdf_writer *wri = fz_new_derived_document_writer(ctx, pdf_writer, pdf_writer_begin_page, pdf_writer_end_page, pdf_writer_close_writer, pdf_writer_drop_writer);
fz_try(ctx)
{
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index e7278ae8..b757dfed 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -2228,7 +2228,7 @@ pdf_lookup_metadata(fz_context *ctx, pdf_document *doc, const char *key, char *b
static pdf_document *
pdf_new_document(fz_context *ctx, fz_stream *file)
{
- pdf_document *doc = fz_new_document(ctx, pdf_document);
+ pdf_document *doc = fz_new_derived_document(ctx, pdf_document);
doc->super.drop_document = (fz_document_drop_fn *)pdf_drop_document_imp;
doc->super.needs_password = (fz_document_needs_password_fn *)pdf_needs_password;
diff --git a/source/svg/svg-doc.c b/source/svg/svg-doc.c
index b535b380..6e127d75 100644
--- a/source/svg/svg-doc.c
+++ b/source/svg/svg-doc.c
@@ -61,7 +61,7 @@ svg_load_page(fz_context *ctx, fz_document *doc_, int number)
if (number != 0)
return NULL;
- page = fz_new_page(ctx, svg_page);
+ page = fz_new_derived_page(ctx, svg_page);
page->super.bound_page = svg_bound_page;
page->super.run_page_contents = svg_run_page;
page->super.drop_page = svg_drop_page;
@@ -91,7 +91,7 @@ svg_open_document_with_buffer(fz_context *ctx, fz_buffer *buf)
root = fz_parse_xml(ctx, buf, 0);
- doc = fz_new_document(ctx, svg_document);
+ doc = fz_new_derived_document(ctx, svg_document);
doc->super.drop_document = svg_drop_document;
doc->super.count_pages = svg_count_pages;
doc->super.load_page = svg_load_page;
diff --git a/source/xps/xps-doc.c b/source/xps/xps-doc.c
index 1a7b4dd7..d81ab5b6 100644
--- a/source/xps/xps-doc.c
+++ b/source/xps/xps-doc.c
@@ -439,7 +439,7 @@ xps_load_page(fz_context *ctx, xps_document *doc, int number)
root = xps_load_fixed_page(ctx, doc, fix);
fz_try(ctx)
{
- page = fz_new_page(ctx, xps_page);
+ page = fz_new_derived_page(ctx, xps_page);
page->super.load_links = (fz_page_load_links_fn *)xps_load_links;
page->super.bound_page = (fz_page_bound_page_fn *)xps_bound_page;
page->super.run_page_contents = (fz_page_run_page_contents_fn *)xps_run_page;