I've been puzzling over why the Konqueror web-browser doesn't display any lines drawn by Inkscape, and yet other browsers and image viewers do, so after a bit of hacking of the generated SVG down to the bare minimum to show the issue, I think I might have found out why.
When Inkscape generates the SVG code for a line, it creates a path element with an "m" (moveto) command, followed by the x and y coordinates, followed by the relative x and y coordinates of the drawn line. However, the SVG spec http://www.w3.org/TR/SVG/paths.html says that relative line-draw coordinates should be preceded by an "l" (lower-case L lineto) command, and that pairs of numbers on their own are treated as a repetition of the previous command. Thus it seems to me that the Konqueror web-browser is correctly treating the second xy pair as another moveto command and so no line is drawn. (And yet Firefox and various image viewers that I've tried do show the line despite this.)
Here's my example code. Note that the code for the red line does not include that lower-case L, but the blue line does:
Code: Select all
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="60">
<g>
<rect width="60" height="60" x="20" y="0" fill="yellowgreen" />
<path d="m 0 40 100 0" stroke="red" stroke-width="10" />
<path d="m 0 20 l 100 0" stroke="blue" stroke-width="10" />
</g>
</svg>
This is the embedded SVG image itself:
This is a PNG image of what Firefox sees:
This is a PNG image of what Konqueror sees: