Off-by-one pixel stuff is not surprising in world where your API deals explicitly with individual pixels. Newer systems are a bit simpler here because they treat the screen as continuous plane that only gets mapped to pixels at the last moment.
The flip side is that you have to worry about weird aliasing (or anti-aliasing!) artifacts, such as black lines turning grey.
The flip side is that you have to worry about weird aliasing (or anti-aliasing!) artifacts, such as black lines turning grey.