summaryrefslogtreecommitdiff
path: root/source/fitz/output-svg.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2017-03-23 18:55:45 -0400
committerRobin Watts <Robin.Watts@artifex.com>2017-03-23 18:56:52 -0400
commit6979982ba2900f451c801d35bb7e52413a89d26e (patch)
tree2b74146bc04e4bd66d00734570947a6d3818344c /source/fitz/output-svg.c
parent031c7035652d3c967321c9c308dea7cfb1c0e6fa (diff)
downloadmupdf-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.c7
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;