/** * Device pixels per page pixel of a 2D context (#674). * * `renderPageToCanvas` paints a page of `scale` ≠ 1 by scaling the context, * and a turned block, a vertical page or a mirrored one adds its own * transform. Text and paths follow the transform on their own; a picture * rasterised into an offscreen bitmap (an SVG, a formula) does not: its * bitmap must be made at the size it shows at on the device, or the blit * resamples it. */ /** Device pixels per unit along the context's x and y axes. */ export interface DeviceScale { x: number; y: number; } /** * The scale of the context's current transform along each of its axes: the * length on the device of one unit of x and of one unit of y, so it holds * through a quarter turn and a mirror. 1 on a context without * `getTransform` (and for a degenerate transform). */ export declare function deviceScaleOf(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D): DeviceScale; /** * The factor a vector picture's bitmap is enlarged by over its size in page * pixels: the context's scale above 1, and 1 at or below it. A page drawn * smaller than its own resolution keeps the bitmap of its page pixels, so * a host that repaints at several reductions (the Sandbox follows the * window) rasterises each picture once. */ export declare function rasterScaleOf(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D): DeviceScale; //# sourceMappingURL=deviceScale.d.ts.map