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 <me@mith.ro>
This commit is contained in:
Tim 'mithro' Ansell 2020-02-07 17:29:16 +01:00
parent 6077907f77
commit 4f30e76688
1 changed files with 3 additions and 0 deletions

View File

@ -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();