HTML5 canvas stroke() thick and fuzzy

后端 未结 7 1736
野性不改
野性不改 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:31

    I found the reason mine was blurry was that there was a slight discrepancy between the inline width and the CSS width.

    I have both inline width/height parameters AND css width/height assigned to my canvas, because I need to keep its physical dimensions static, while increasing its inline dimensions for retina screens.

    Check yours are the same if you have a situation like mine.

提交回复
热议问题