Canvas drawings, like lines, are blurry

前端 未结 10 955
野的像风
野的像风 2020-11-27 15:15

I have a

and canvas, which is drawn using:

context.lineWidth = 1;
context.strokeStyle = \"gray\         


        
10条回答
  •  暖寄归人
    2020-11-27 15:43

    in order to get rid of the blurryness you need to set the size of the canvas in two manners: first withcanvas.width = yourwidthhere; and canvas.height = yourheighthere; second by setting the css attribute either by js or a stylesheet

提交回复
热议问题