Tag:high definition

  • Learning notes: canvas with high definition screen


    There is a window property calleddevicePixelRatioThe ratio of physical pixels to CSS pixels of the device at that time can be calculated.Grammar: value = window.devicePixelRatio; Then the canvas is drawn by multiple, and then scaled by CSS to achieve the effect of high definition.Usage: /** @type {HTMLCanvasElement} */ let canvas = document.getElementById(“canvas”) let ctx = […]

  • Gray processing of canvas image


    Introduction When playing the game, I encounter an interactive effect: a black-and-white picture in the background, and then erase the interaction to make the image color. I also want to try this effect. The first thing I think about is how the black-and-white picture is formed. So I checked the data and found a method […]

  • The problem of blurring 1 PX line in canvas


    Introduction stayBlur of canvas displayThe problem of blurring on the high-definition display screen has been solved. Recently, I encountered the situation of drawing straight lines. I used the same scheme. At first, I felt that the effect was not great, but after a long time, I found that the fuzzy feeling of straight lines on […]

  • REM use configuration


    How to make the font size of the root element change dynamically? /*dpi*/ /* for 1080+ px width screen */ /* for 1080 px width screen */ /* for 800 px width screen */ /* for 800 px width screen */ @media only screen and (min-width: 751px) { html, body { font-size: 31.25px; } } […]

  • Solution to the problem of no sound in the front headphone jack of win10


    After I refitted my head, I found that there was no sound and no response in the front headphone jack of win10, but the rear headphone jack was ok, and my sound card driver was also installed. I wonder what’s the problem and how to solve it? Go to Du Niang and search. There are […]

  • Chinese high definition non scanning copy of C programming language (K & R)


    Chinese high definition non scanning copy of C programming language (K & R) (bookmarked directory) I have no love for a website that needs C coins for downloading. It’s not easy to find one and send it out to see if it can help others  Attach addr: https://pan.baidu.com/s/1epgih4y-3lsykuinxiuukaExtraction code: 79xj Update: https://github.com/zerophong/learning-resource