Skip to main content

Module fit

Module fit 

Source
Expand description

The backing store, sized for the display.

The kernel, the layout and the display list all work in CSS pixels; a device with more than one device pixel per CSS pixel gets a bigger backing store and a context scaled to match, so nothing above this ever sees the difference.

Structs§

DevicePixelRatio
How many device pixels one CSS pixel is worth. Never zero or negative: a host that reports one is a host whose canvas would have no pixels.

Functions§

fit
Size canvas’s backing store for css_size at ratio and put ctx in CSS pixels. Answers the viewport the display list is drawn in.