Your vertical line is centered on y = 1, with thickness = 1. Therefore it goes from y = 0.5 to y = 1.5. But to fill exactly the second column of pixels, it should rather go from y = 1 to y = 2. So, instead of centering it on y = 1, center it on y = 1.5.
Same for the horizontal line.