HTML5 Canvas and Anti-aliasing

antialiasing, canvas, html

Solution

Anti-aliasing cannot be turned on or off, and is controlled by the browser.

Can I turn off antialiasing on an HTML <canvas> element?

Problem

How to turn on the anti-aliasing on an canvas. The following code doesn't draw a smooth line: ``` var context = mainCanv.getContext("2d"); if (context) { context.moveTo(0,0); context.lineTo(100,75); context.strokeStyle = "#df4b26"; context.lineWidth = 3; context.stroke(); } ```

Original source

Related problems