diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-03-23 18:55:45 -0400 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2017-03-23 18:56:52 -0400 |
commit | 6979982ba2900f451c801d35bb7e52413a89d26e (patch) | |
tree | 2b74146bc04e4bd66d00734570947a6d3818344c /source/fitz/output-svg.c | |
parent | 031c7035652d3c967321c9c308dea7cfb1c0e6fa (diff) | |
download | mupdf-6979982ba2900f451c801d35bb7e52413a89d26e.tar.xz |
Add fz_new_writer function.
Moves document_writers into the same style as
fz_new_{image,document,page} etc.
Diffstat (limited to 'source/fitz/output-svg.c')
-rw-r--r-- | source/fitz/output-svg.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/fitz/output-svg.c b/source/fitz/output-svg.c index f8711031..0758b843 100644 --- a/source/fitz/output-svg.c +++ b/source/fitz/output-svg.c @@ -58,13 +58,8 @@ svg_drop_writer(fz_context *ctx, fz_document_writer *wri_) fz_document_writer * fz_new_svg_writer(fz_context *ctx, const char *path, const char *args) { - fz_svg_writer *wri; const char *val; - - wri = fz_malloc_struct(ctx, fz_svg_writer); - wri->super.begin_page = svg_begin_page; - wri->super.end_page = svg_end_page; - wri->super.drop_writer = svg_drop_writer; + fz_svg_writer *wri = fz_new_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; |