How can i improve my Html5 Canvas pathing Quality?

后端 未结 6 1225
庸人自扰
庸人自扰 2020-12-29 23:01

I have been writing a little javascript plugin, and i am having a little trouble with improving the canvas overall quality of the render. I have searched over the web here a

6条回答
  •  甜味超标
    2020-12-29 23:34

    Anti-aliasing helps a lot. But when you have angled lines that are close to horizontal, or vertical, or are gently curving, the anti-aliasing is going to be a lot more noticeable. Especially for thin lines with widths of less than a couple of a pixels or so.

    As Maciej points out, if you have a line that's around 1px width and it passed directly between two pixels, anti-aliasing will result in a line that's two pixels wide and half-grey.

    You may have to just learn to live with it. There is only so much that anti-aliasing can do.

提交回复
热议问题