scaleBuffer
Home > @anocca/sequence-viewer-utils > scaleBuffer
Scale the canvas according to the device pixel ratio
Signature:
export declare function scaleBuffer(canvas: HTMLCanvasElement, width: number, height: number): {
ratio: number;
shouldScale: boolean;
} | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
canvas | HTMLCanvasElement | |
width | number | |
height | number |
Returns:
{ ratio: number; shouldScale: boolean; } | undefined