/**
 * Handles logical/physical canvas size calculations and optional
 * device-pixel-content-box observation.
 */
export default class CanvasSizeHelper {
    /**
     * @param {HTMLElement} container
     * @param {HTMLCanvasElement} canvas
     * @param {() => {width: number, height: number}} sizeSource
     * @param {() => void} [onPhysicalSizeChange]
     */
    constructor(container: HTMLElement, canvas: HTMLCanvasElement, sizeSource: () => {
        width: number;
        height: number;
    }, onPhysicalSizeChange?: () => void);
    _container: HTMLElement;
    _canvas: HTMLCanvasElement;
    _sizeSource: () => {
        width: number;
        height: number;
    };
    _onPhysicalSizeChange: () => void;
    /**
     * @type {{ width: number, height: number } | undefined}
     */
    _logicalCanvasSize: {
        width: number;
        height: number;
    } | undefined;
    /**
     * @type {{ width: number, height: number } | undefined}
     */
    _devicePixelContentBoxSize: {
        width: number;
        height: number;
    } | undefined;
    /**
     * @type {ResizeObserver | undefined}
     */
    _devicePixelContentBoxObserver: ResizeObserver | undefined;
    invalidate(): void;
    finalize(): void;
    /**
     * Returns the canvas size in true display pixels
     *
     * @param {{ width: number, height: number }} [logicalSize]
     */
    getPhysicalCanvasSize(logicalSize?: {
        width: number;
        height: number;
    }): {
        width: number;
        height: number;
    };
    /**
     * Returns the ratio between true display pixels and logical pixels.
     *
     * @param {{ width: number, height: number }} [logicalSize]
     */
    getDevicePixelRatio(logicalSize?: {
        width: number;
        height: number;
    }): number;
    /**
     * Returns the size of the canvas canvas container size in logical pixels,
     * without devicePixelRatio correction.
     */
    getLogicalCanvasSize(): {
        width: number;
        height: number;
    };
    _observeDevicePixelContentBox(): void;
}
//# sourceMappingURL=canvasSizeHelper.d.ts.map