/** * Inline colour swatch (`:swatch{color="…"}`): a square the size of a * capital sitting on the baseline, filled with the swatch colour and * outlined in the text colour so a pale fill still reads against the paper. * Shared by the body-text and resource-block painters. A swatch segment * may carry an inline symbol instead (`:icon[alt]{…}`, #1058), painted by * {@link paintInlineIcon}. */ import type { VDTInlineIcon, VDTSwatch } from '../vdt.js'; export declare function paintSwatch(ctx: CanvasRenderingContext2D, x: number, baseline: number, side: number, fill: string | undefined, ink: string): void; /** * An inline symbol (`:icon[alt]{…}`, #1058) on the segment at `x`: a * resource's picture fitted to its box (tinted when it has a colour; an * empty outline while the resource is unknown or not decoded), a glyph set * in its own face on the baseline, or a line sample stroked across the box * at half its height. `ink` is the text's colour. A picture and a glyph go * through `drawImage` / `fillText`, which a mirrored page's flow turns back * (`mirrorFrame.ts`). */ export declare function paintInlineIcon(ctx: CanvasRenderingContext2D, icon: VDTInlineIcon, x: number, baseline: number, ink: string): void; /** A `'swatch'` segment of `width` at `x`: its symbol when it carries one * (#1058), else the colour swatch, with its own shape when it has one * (#1104). `rtl`: the segment is set right to left (the gap after the * square is on its left). */ export declare function paintSwatchSegment(ctx: CanvasRenderingContext2D, swatch: VDTSwatch | undefined, x: number, baseline: number, width: number, ink: string, rtl?: boolean): void; //# sourceMappingURL=swatch.d.ts.map