I want to draw I line between two points that is pixelated, eg
Whats the most efficient way to do this?
I could just draw a bunch of rectangles based off of calculations but that sounds like it would be very expensive, is there some faster way to do this?
Maybe a way to customize ctx.strokestyle?
eg:
ctx.strokeStyle = "pixelated";
ctx.beginPath();
ctx.moveTo(0, 0);
ctx.lineTo(100, 100);
ctx.stroke();
Edit: I am not trying to achieve crisp rendering, I have already done that, the image is blurry because I just got it from a google search
I am asking how to draw a line that is pixelated rather than a normal line