From 4f30e766880a5032e6a5fdfb10eca02199b60837 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 7 Feb 2020 17:29:16 +0100 Subject: [PATCH] Make SVG output actually SVG again. Currently the SVG output is a SVG file with an embedded `image/png` file. Restricting to `CAIRO_SVG_VERSION_1_2` means the file goes back to being a vector. Signed-off-by: Tim 'mithro' Ansell --- graphics/grTCairo1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphics/grTCairo1.c b/graphics/grTCairo1.c index 7e293d2f..27299739 100644 --- a/graphics/grTCairo1.c +++ b/graphics/grTCairo1.c @@ -370,6 +370,9 @@ GrTCairoPlotSVG (char *filename, MagWindow *mw) wind_context = tcairodata->context; tcairodata->surface = (cairo_surface_t *)cairo_svg_surface_create(filename, (double)screenw, (double)screenh); + cairo_svg_surface_restrict_to_version( + tcairodata->surface, CAIRO_SVG_VERSION_1_2); + tcairodata->context = cairo_create(tcairodata->surface); WindRedisplay(mw); WindUpdate();