Drawing GOOD LOOKING (like in Flash) lines on canvas (HTML5) - possible?

后端 未结 3 2152
抹茶落季
抹茶落季 2020-12-10 14:01

Is there any way to draw a line using javascript and the canvas with \"better\" antialiasing, like Flash does?

I know the Math.floor(coord)+0.5 trick to get an exact

3条回答
  •  忘掉有多难
    2020-12-10 14:35

    I doubt you are going to find anything that will make it look truly good that isn't too slow to be useful. One thing that you can try that won't hurt performance too much is to draw 4 lines overlaid on one another, each offset by a fraction of a pixel in x and y. The downside is it will look a bit blurry.

提交回复
热议问题