Optional ReadonlycolorOptional ReadonlyopacityGlobal mask-layer opacity. This stays outside the prepared artifact so it can be updated cheaply at render time.
Optional ReadonlyalphaCompatibility alias for opacity.
Prefer opacity for new code. Mask draw instructions still use alpha
internally because renderer backends operate on RGBA-like primitives.
Optional ReadonlyfillOpacity baked into the prepared mask fill. Unlike opacity, this does not
attenuate a mask outline, so callers can use translucent fills with opaque
borders.
Optional ReadonlymodeWhether to render mask fill, stroke, or both.
Optional ReadonlystrokeOptional mask outline. Pass a resolver for per-detection outlines.
Optional ReadonlyshouldReturn false to skip rendering a detection in this mask style.
Mask fill color. Pass a resolver for per-class mask colors.