HTML5 canvas stroke() thick and fuzzy

后端 未结 7 1763
野性不改
野性不改 2020-12-09 08:04

I\'m trying to allow the user to draw a rectangle on the canvas (like a selection box). I\'m getting some ridiculous results, but then I noticed that even just trying the co

7条回答
  •  误落风尘
    2020-12-09 08:45

    The blurry problem will happen if you use css to set the canvas height and width instead of setting height and width in the canvas element.

    
    
         RIGHT WAY -- SHARP LINES
    

提交回复
热议问题