import { Selection } from "d3"; import NightingaleBaseElement, { Constructor } from "../../nightingale-base-element"; import { WithResizableInterface } from "../withResizable"; export interface WithCanvasInterface { /** D3 selection with this element's node. Is automatically set to the first ancestor node when first rendered. */ canvas?: Selection; /** Canvas rendering context. */ canvasCtx?: CanvasRenderingContext2D; /** Ratio of canvas logical size versus canvas display size. */ canvasScale: number; /** Runs when device pixel ratio (`this.canvasScale`) changes, e.g. when browser zoom is changed or browser window is moved to a different screen. */ onCanvasScaleChange(): void; /** Adjust width and height of `this.canvasCtx` based on canvas size and scale if needed (clears canvas content!). Subclass should call this method just before redrawing the canvas. */ adjustCanvasCtxLogicalSize(): void; } declare const withCanvas: >(superClass: T) => Constructor & T; export default withCanvas; //# sourceMappingURL=index.d.ts.map