I know it’s not the jQuery SVG library causing this issue, but when rendering horizontal or vertical SVG lines on integral x,y coordinates, lines are 2px wide instead of 1px. This is probably to do with anti-aliasing In order to get them fixed, and draw a line that’s perfectly 1px wide, I need to adjust coordinates by adding 0.5px.
Is there a way to get lines 1px thick without having to tweak them like this?
A way to solve the problem is to apply some CSS to the lines:
The spec chapter on shape-rendering property.
Basically it turns off antialiasing for the lines, and the lines that are NOT straight horizontal or vertical may NOT look very pretty.
But probably you’d better stick to adding .5 to the lines’ coordinates, because browsers do what they are told to: the line is on exact coordinates and the stroke is painted on both sides of the line, half pixel here and half pixel there.