import type { InjectedMeshConstructor, InjectedMeshGeometryConstructor, InjectedShaderFactory } from "#renderers/injected-pixi"; import type { PreparedRegionMaskCoverageEntry } from "#render-preparation/mask-frame-artifact"; import { type PixiRectangleConstructor, type PixiViewportBounds } from "./pixi-mask-viewport"; import type { AlphaMask as PixiAlphaMask, Container as PixiContainer, Filter as PixiFilter, ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js"; type RegionCoverageMaskMesh = PixiMesh; type AlphaMaskConstructor = new (options: { mask: PixiContainer; }) => PixiAlphaMask; type ImageSourceConstructor = new (options: { autoGenerateMipmaps?: boolean; dynamic: boolean; height: number; resource: HTMLCanvasElement; scaleMode?: "linear" | "nearest"; width: number; }) => PixiImageSource; type UniformGroupConstructor = new (uniforms: Record"; value: Float32Array; }>) => PixiUniformGroup; export interface PixiRegionCoverageMaskArtifact { readonly texture: PixiTexture; } export interface PixiRegionCoverageMask { readonly container: PixiContainer; readonly display: RegionCoverageMaskMesh; readonly effect: PixiAlphaMask; releaseTexture(source: PixiImageSource): void; setAntialiasResolution(resolution: number): void; syncViewportBounds(): void; render(options: { readonly artifact: PixiRegionCoverageMaskArtifact; readonly coverage: PreparedRegionMaskCoverageEntry; readonly crop: { readonly height: number; readonly width: number; readonly x: number; readonly y: number; }; readonly flipHorizontal: boolean; readonly flipVertical: boolean; readonly height: number; readonly rotation: number; readonly width: number; readonly x: number; readonly y: number; }): boolean; destroy(): void; } /** * Produces a per-detection alpha mask from a compact prepared coverage crop. * The crop is sampled and transformed entirely on the GPU; semantic RLE masks * never enter the playback hot path. */ export declare function createPixiRegionCoverageMask(options: { readonly getAnnotationAntialiasing?: () => boolean; readonly getAntialiasResolution?: () => number; readonly getViewportBounds?: () => PixiViewportBounds | undefined; readonly defaultFilterVert?: string; readonly Filter?: Pick; readonly AlphaMask: AlphaMaskConstructor; readonly Container: new () => PixiContainer; readonly Rectangle: PixiRectangleConstructor; readonly ImageSource: ImageSourceConstructor; readonly Mesh: InjectedMeshConstructor; readonly MeshGeometry: InjectedMeshGeometryConstructor; readonly Shader: InjectedShaderFactory; readonly UniformGroup: UniformGroupConstructor; }): PixiRegionCoverageMask; export {}; //# sourceMappingURL=pixi-region-coverage-mask.d.ts.map