supervision-js
    Preparing search index...

    Interface BaseMaskStyleOptions

    interface BaseMaskStyleOptions {
        alpha?: number;
        color?: DetectionStyleValue<number, AnnotationStyleContext>;
        fillAlpha?: DetectionStyleValue<number, AnnotationStyleContext>;
        mode?: DetectionStyleValue<MaskRenderMode, AnnotationStyleContext>;
        opacity?: number;
        shouldRender?: DetectionStylePredicate<AnnotationStyleContext>;
        stroke?: DetectionStyleValue<
            MaskStrokeStyleOptions
            | null
            | undefined,
            AnnotationStyleContext,
        >;
    }
    Index
    alpha?: 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.

    color?: DetectionStyleValue<number, AnnotationStyleContext>

    Mask fill color. Pass a resolver for per-class mask colors.

    fillAlpha?: DetectionStyleValue<number, AnnotationStyleContext>

    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.

    mode?: DetectionStyleValue<MaskRenderMode, AnnotationStyleContext>

    Whether to render mask fill, stroke, or both.

    opacity?: number

    Global mask-layer opacity. This stays outside the prepared artifact so it can be updated cheaply at render time.

    shouldRender?: DetectionStylePredicate<AnnotationStyleContext>

    Return false to skip rendering a detection in this mask style.

    stroke?: DetectionStyleValue<
        MaskStrokeStyleOptions
        | null
        | undefined,
        AnnotationStyleContext,
    >

    Optional mask outline. Pass a resolver for per-detection outlines.