export type GlobalCompositeOperation = 'source-over' | 'source-in' | 'source-out' | 'source-atop' | 'destination-over' | 'destination-in' | 'destination-out' | 'destination-atop' | 'lighter' | 'copy' | 'xor' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
export interface CanvasGradient {
    addColorStop(offset: number, color: string): void;
}
export interface TextMetrics {
    readonly width: number;
    readonly actualBoundingBoxAscent: number;
    readonly actualBoundingBoxDescent: number;
    readonly actualBoundingBoxLeft: number;
    readonly actualBoundingBoxRight: number;
    readonly fontBoundingBoxAscent: number;
    readonly fontBoundingBoxDescent: number;
}
export interface CanvasImage {
    readonly width: number;
    readonly height: number;
    readonly complete: boolean;
}
export interface Ctx {
    fillStyle: string | CanvasGradient;
    strokeStyle: string | CanvasGradient;
    lineWidth: number;
    globalAlpha: number;
    lineCap: 'butt' | 'round' | 'square';
    lineJoin: 'miter' | 'round' | 'bevel';
    miterLimit: number;
    globalCompositeOperation: GlobalCompositeOperation;
    shadowColor: string;
    shadowBlur: number;
    shadowOffsetX: number;
    shadowOffsetY: number;
    filter: string;
    clearRect(x: number, y: number, w: number, h: number): void;
    fillRect(x: number, y: number, w: number, h: number): void;
    strokeRect(x: number, y: number, w: number, h: number): void;
    beginPath(): void;
    closePath(): void;
    moveTo(x: number, y: number): void;
    lineTo(x: number, y: number): void;
    arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
    rect(x: number, y: number, w: number, h: number): void;
    quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
    bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
    arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
    ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
    roundRect(x: number, y: number, w: number, h: number, radius: number): void;
    fill(fillRule?: 'nonzero' | 'evenodd'): void;
    stroke(): void;
    clip(fillRule?: 'nonzero' | 'evenodd'): void;
    isPointInPath(x: number, y: number, fillRule?: 'nonzero' | 'evenodd'): boolean;
    isPointInPath(path: Path2D, x: number, y: number, fillRule?: 'nonzero' | 'evenodd'): boolean;
    isPointInStroke(x: number, y: number): boolean;
    isPointInStroke(path: Path2D, x: number, y: number): boolean;
    fillInstances(template: Path2D, data: InstanceData, count: number): void;
    save(): void;
    restore(): void;
    translate(x: number, y: number): void;
    scale(x: number, y: number): void;
    rotate(angle: number): void;
    transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
    setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
    resetTransform(): void;
    createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
    createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
    font: string;
    textAlign: 'start' | 'left' | 'center' | 'right' | 'end';
    textBaseline: 'alphabetic' | 'top' | 'hanging' | 'middle' | 'ideographic' | 'bottom';
    fillText(text: string, x: number, y: number): void;
    strokeText(text: string, x: number, y: number): void;
    measureText(text: string): TextMetrics;
    imageSmoothingEnabled: boolean;
    drawImage(image: CanvasImage, dx: number, dy: number): void;
    drawImage(image: CanvasImage, dx: number, dy: number, dw: number, dh: number): void;
    drawImage(image: CanvasImage, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
    present(): void;
}
export type InstanceData = {
    x: Float32Array;
    y: Float32Array;
    scale?: Float32Array | number;
    scaleX?: Float32Array | number;
    scaleY?: Float32Array | number;
    rotation?: Float32Array | number;
};
export interface Path2D {
    moveTo(x: number, y: number): void;
    lineTo(x: number, y: number): void;
    arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
    rect(x: number, y: number, w: number, h: number): void;
    quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
    bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
    arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
    ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
    roundRect(x: number, y: number, w: number, h: number, radius: number): void;
    closePath(): void;
}
export type FrameParams = {
    width: number;
    height: number;
    dt: number;
    time: number;
    frame: number;
    depsSnapshot?: ReadonlyArray<unknown>;
};
export type DrawCallback = (ctx: Ctx, params: FrameParams) => void;
declare global {
    var Path2D: {
        new (): import('./types').Path2D;
    };
    var __rncanvasGetContext: ((tag: number) => Ctx) | undefined;
    var __rncanvasStartLoop: ((tag: number, draw: DrawCallback) => void) | undefined;
    var __rncanvasStopLoop: ((tag: number) => void) | undefined;
    var __rncanvasCreateImage: ((bytes: ArrayBuffer) => import('./types').CanvasImage | null) | undefined;
    var __rncanvasRegisterFont: ((bytes: ArrayBuffer, family: string) => boolean) | undefined;
}
//# sourceMappingURL=types.d.ts.map