Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think that can be turned off. I tried that recently. There is a global flag we can set to turn of antialiasing.

UPDATE: it's

    image-rendering: pixelated;

https://developer.mozilla.org/en-US/docs/Web/CSS/image-rende...


This rabbit hole is a waste of time, as someone who's been down it, you'll find piles of resources claiming CSS and JS flags will give you what you want but it never really gets there.

The only way to actually get true aliased brushes in canvas is implementing a line drawing algorithm manually and drawing down aliased circles like how https://gifpaint.com/ & https://jspaint.app/ do it.


And doing it this way is slooowww in JS


This property is already applied if you inspect the canvas elements. Better solution could be context SVG filters https://stackoverflow.com/a/49357655/342095 https://stackoverflow.com/a/68372384/342095




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: