Hacker News new | ask | show | jobs
by djxfade 734 days ago
It's possible to avoid this issue. I implemented a Canvas based clone of the classic MS Paint back in the days. One of the tricks to avoid this, was to use decimal pixel coordinates, so instead of drawing a pixel at (100, 200), you would draw at (100.5, 200.5).
1 comments

That's not a complete solution. For instance, it assumes that each canvas pixel corresponds to a single logical pixel, and that each logical pixel corresponds to a single physical pixel. There are a number of reasons that might not be true.