weasel API - v0.8.0
    Preparing search index...

    Type Alias FillStyle

    FillStyle:
        | { color: string; fill?: "solid"; opacity?: number }
        | { fill: "pattern"; opacity?: number; pattern: TextureHandle }
        | {
            fill: "linear-gradient";
            from: { x: number; y: number };
            opacity?: number;
            stops: GradStop[];
            to: { x: number; y: number };
        }
        | {
            center: { x: number; y: number };
            fill: "radial-gradient";
            opacity?: number;
            radius: number;
            stops: GradStop[];
        }
        | {
            angle: number;
            center: { x: number; y: number };
            fill: "conic-gradient";
            opacity?: number;
            stops: GradStop[];
        }

    Color/texture strategy for fills (and, via Stroke.paint, strokes).

    fill is optional and defaults to 'solid'{ color: '#abc' } is equivalent to { fill: 'solid', color: '#abc' }. Pattern paints must set fill: 'pattern' explicitly.

    The 'pattern' variant's payload is a TextureHandle (registered via registerTexture()). The kit-level factory createTilePattern (and the patterns-builtin catalog: hatch, crosshatch, dots, chunks) produces these handles by rendering a tile to an OffscreenCanvas and registering the resulting ImageBitmap as a GL texture.