export interface Sprite {
canvas: HTMLCanvasElement;
/** Alpha per device pixel, row-major — the source for tinting. */
alpha: Uint8ClampedArray;
/** CSS-px size to draw it at. */
w: number;
h: number;
/** CSS-px offset from the sprite's top-left to its anchor (stroke centre). */
ax: number;
ay: number;
}
export declare function gaussBlur(a: Float32Array, w: number, h: number, sigma: number): Float32Array;
/** The wide halo: four blurred strokes stacked, at `halfLen` half-length. */
export declare function bakeHalo(halfLen: number, s: number, dpr: number): Sprite;
/** The catch-light: two tight strokes with a radial fade at the ends. */
export declare function bakeExtra(halfLen: number, s: number, dpr: number): Sprite;
/** A tinted copy of a white sprite. `holder` caches by tint so the re-tint
* only happens when the colour actually changes. Pixel-data based on
* purpose: no `source-in` compositing, which WebKit intermittently gets
* wrong on accelerated canvases (a solid rectangle instead of the shape). */
export interface Tinted {
canvas: HTMLCanvasElement | null;
img: ImageData | null;
tint: number;
src: Sprite | null;
}
export declare function tintSprite(src: Sprite, r: number, g: number, b: number, holder: Tinted): HTMLCanvasElement;