import { AlphaType, ColorType } from './types';
export declare class PAGSurface {
    /**
     * Make a PAGSurface from canvas.
     */
    static fromCanvas(canvasID: string): PAGSurface;
    /**
     * Make a PAGSurface from texture.
     */
    static fromTexture(textureID: number, width: number, height: number, flipY: boolean): PAGSurface;
    /**
     * Make a PAGSurface from frameBuffer.
     */
    static fromRenderTarget(frameBufferID: number, width: number, height: number, flipY: boolean): PAGSurface;
    wasmIns: any;
    isDestroyed: boolean;
    constructor(wasmIns: any);
    /**
     * The width of surface in pixels.
     */
    width(): number;
    /**
     * The height of surface in pixels.
     */
    height(): number;
    /**
     * Update the size of surface, and reset the internal surface.
     */
    updateSize(): void;
    /**
     * Erases all pixels of this surface with transparent color. Returns true if the content has
     * changed.
     */
    clearAll(): boolean;
    /**
     * Free the cache created by the surface immediately. Can be called to reduce memory pressure.
     */
    freeCache(): void;
    /**
     * Copies pixels from current PAGSurface to dstPixels with specified color type, alpha type and
     * row bytes. Returns true if pixels are copied to dstPixels.
     */
    readPixels(colorType: ColorType, alphaType: AlphaType): Uint8Array | null;
    destroy(): void;
}
