From ec6c2b3dc0558bea7ca9071058ced5d139cc3af8 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 12 Nov 2005 23:36:10 +0000 Subject: [PATCH] add xmlns declaration to svg output -- R.P. Aditya git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@710 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_gfx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index 1d46a858..fc1da9bb 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -1440,9 +1440,9 @@ int gfx_render_svg (gfx_canvas_t *canvas, "-->\n", fp); svg_start_tag(fp, "svg"); fputs(" width=\"", fp); - svg_write_number(fp, width * canvas->zoom); + svg_write_number(fp, width * canvas->zoom); fputs("\" height=\"", fp); - svg_write_number(fp, height * canvas->zoom); + svg_write_number(fp, height * canvas->zoom); fputs("\" x=\"0\" y=\"0\" viewBox=\"", fp); svg_write_number(fp, -LINEOFFSET); fputs(" ", fp); @@ -1452,8 +1452,10 @@ int gfx_render_svg (gfx_canvas_t *canvas, fputs(" ", fp); svg_write_number(fp, height - LINEOFFSET); fputs("\" preserveAspectRatio=\"xMidYMid\"", fp); - fprintf(fp, " font-family=\"%s\"", svg_default_font); /* default font */ - fputs(" stroke-linecap=\"round\" stroke-linejoin=\"round\"", fp); + fprintf(fp, " font-family=\"%s\"", svg_default_font); /* default font */ + fputs(" stroke-linecap=\"round\" stroke-linejoin=\"round\"", fp); + fputs(" xmlns=\"http://www.w3.org/2000/svg\"", fp); + fputs(" xmlns:xlink=\"http://www.w3.org/1999/xlink\"", fp); svg_close_tag(fp); svg_start_tag(fp, "rect"); fprintf(fp, " x=\"0\" y=\"0\" width=\"%d\" height=\"%d\"", width, height); -- 2.30.2