From: oetiker Date: Sat, 12 Nov 2005 23:36:10 +0000 (+0000) Subject: add xmlns declaration to svg output -- R.P. Aditya X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ec6c2b3dc0558bea7ca9071058ced5d139cc3af8;p=rrdtool-all.git 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 --- 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);