import type { Detection } from "#types/detections"; import type { MaskDrawInstruction, MaskStrokeStyleOptions, MaskStyle, MaskStyleContext } from "#types/mask-style"; import { MaskRenderMode } from "#types/mask-style"; import type { DetectionStylePredicate, DetectionStyleValue } from "#types/style"; export interface BaseMaskStyleOptions { /** * Mask fill color. Pass a resolver for per-class mask colors. */ readonly color?: DetectionStyleValue; /** * Global mask-layer opacity. This stays outside the prepared artifact so it * can be updated cheaply at render time. */ readonly opacity?: number; /** * Compatibility alias for `opacity`. * * Prefer `opacity` for new code. Mask draw instructions still use `alpha` * internally because renderer backends operate on RGBA-like primitives. */ readonly alpha?: number; /** * Opacity baked into the prepared mask fill. Unlike `opacity`, this does not * attenuate a mask outline, so callers can use translucent fills with opaque * borders. */ readonly fillAlpha?: DetectionStyleValue; /** * Whether to render mask fill, stroke, or both. */ readonly mode?: DetectionStyleValue; /** * Optional mask outline. Pass a resolver for per-detection outlines. */ readonly stroke?: DetectionStyleValue; /** * Return false to skip rendering a detection in this mask style. */ readonly shouldRender?: DetectionStylePredicate; } /** * Default compressed-RLE mask style. * * Static color/stroke options can reuse prepared mask artifacts by key. Dynamic * color or stroke resolvers intentionally do not expose an artifact key, so new * style objects rebuild prepared palettes instead of reusing stale ones. */ export declare class BaseMaskStyle implements MaskStyle { readonly artifactKey: string | undefined; readonly opacity: number; private readonly options; constructor(options?: BaseMaskStyleOptions); resolve(detection: Detection, context: MaskStyleContext): MaskDrawInstruction | undefined; } //# sourceMappingURL=mask-style.d.ts.map