This is due to the fact that lines are drawn above all the pixels over which they ended (positioning on the canvas is in the float). If you want to draw exact vertical or horizontal lines in javascript on canvas, you better have them one and a half times.
. : y- 1. . y- 4,5. .

, , :
for (var i = 1; i < objCanvas.height / intGridWidth; i++)
{
objContext.strokeStyle = "white";
var y = Math.floor(i*intGridWidth)+0.5
objContext.moveTo(0, y);
objContext.lineTo(objCanvas.width, y);
objContext.stroke();
}
:
http://jsfiddle.net/dystroy/7NJ6w/
, , , , - . :
function drawThinHorizontalLine(c, x1, x2, y) {
c.lineWidth = 1;
var adaptedY = Math.floor(y)+0.5;
c.beginPath();
c.moveTo(x1, adaptedY);
c.lineTo(x2, adaptedY);
c.stroke();
}
, , .