http://sidneys77crlfslcr7zmj3msmxchgnxhrxlp3p3kbaswo7twchjnicid.onion/programming/tips/2024/12/02/html5-canvas-tips.html
Maybe an illustration will help: So, let’s apply these fixes: canvas { width : 300px ; height : 300px ; image-rendering : pixelated ; } // ... ctx . rect ( 5 .5 , 5 .5 , 40 , 40 ); // ... HI-DPI Canvas Because the canvas element has a specific size in pixels, it is not DPI-aware. That is, if your operating system or
browser zoom is set to anything other than 100%, the number of physical screen pixels that represent each CSS pixel may
not be in a...