import { PAGView as NativePAGView } from '../pag-view'; import type { PAGComposition } from '../pag-composition'; export interface PAGViewOptions { /** * Render first frame when pag view init. default true. */ firstFrame?: boolean; /** * Use style to scale canvas. default false. * When target canvas is offscreen canvas, useScale is false. */ useScale?: boolean; } export type wxCanvas = (HTMLCanvasElement | OffscreenCanvas) & { requestAnimationFrame: (callback: () => void) => number; cancelAnimationFrame: (requestID: number) => void; }; export declare class PAGView extends NativePAGView { /** * Create pag view. * @param file pag file. * @param canvas target render canvas. * @param initOptions pag view options * @returns */ static init(file: PAGComposition, canvas: HTMLCanvasElement | OffscreenCanvas, initOptions?: PAGViewOptions): Promise; protected pagViewOptions: PAGViewOptions; /** * Update size when changed canvas size. */ updateSize(): void; calculateDisplaySize(canvas: any): { width: any; height: any; }; /** * WeChat Mini Programs do not support capturing screenshots of WebGL Canvas. */ makeSnapshot(): never; protected flushLoop(force?: boolean): Promise; protected flushNextFrame(force?: boolean): Promise; protected getNowTime(): number; protected setTimer(): void; protected clearTimer(): void; protected resetSize(useScale?: boolean): void; }