You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drawElement(element ...) takes the CTM (current transform matrix) of the canvas into consideration. The image drawn into the canvas is sized to element's border box size;
But that is not enough into to know how to render when wanting to take devicePixelRatio into account.
Assume a devicePixelRatio of 3.5 from a Samsung S20 Ultra. Given an element with a border box size of 400x300 CSS pixels, to match the HTML I'd want that rendered to 1400x1050 in the canvas. It doesn't seem like there is a way to know apriori what size the developer wants. Should a devicePixelRatio option be add to the options? Or maybe there's some other solution like making a container element that is 400x300 but setting it's zoom to 350%. Just throwing out ideas.