/** * Chinese annotations on the canvas (#193, #194, #195): the marks the * layout set on a line (`VDTLine.marks`: emphasis dots, proper-name and * book-title lines), a ruby base's reading, a warichu note's rows and the * kanbun marks of a character (#430). All * of it is placed by the layout in the flow frame of the line, so on a * vertical page it is painted inside the page's flow transform as the text * is, and text runs go through {@link fillFlowText} (cells upright, Latin * sideways). */ import type { VDTAnnotationRun, VDTKunten, VDTLine, VDTLineMark, VDTLineSegment, VDTRuby, VDTWarichu } from '../vdt.js'; type Ctx = CanvasRenderingContext2D; /** A sesame dot (﹅): a lens `size` long and 0.3 of it wide, * leaning a third of a right angle, centred on the origin. The lens * stands the same way on the sheet in horizontal and vertical text (the * glyph U+FE45 has no vertical form; CSS `text-emphasis: sesame` draws it * upright in `vertical-rl`): on a vertical page, whose flow is painted a * quarter turn clockwise, `vertical` turns the lens a quarter turn back. */ export declare function sesamePath(size: number, vertical?: boolean): { x: number; y: number; }[][]; /** The points of a wave along a line mark, `step` px apart. */ export declare function wavePoints(mark: Pick, x0?: number, y0?: number): { x: number; y: number; }[]; /** The centres of the dots of a `dotted` line, along it from its start * (see `VDTLineMark.gap`). */ export declare function dottedCentres(mark: Pick, x0?: number): number[]; /** Trace a rectangle whose left and right ends are rounded by their own * radii (a highlight band, #888). */ export declare function bandPath(ctx: Ctx, x: number, y: number, w: number, h: number, rl: number, rr: number): void; /** Paint the highlight bands of a line (`VDTLine.highlights`, #888), under * its text: called before the line is painted. */ export declare function paintLineHighlights(ctx: Ctx, line: VDTLine): void; /** Paint the marks of a line (`VDTLine.marks`) in `color` unless a mark * has its own. On a vertical page a sesame turns back against the flow * (see {@link sesamePath}). */ export declare function paintLineMarks(ctx: Ctx, line: VDTLine, color: string): void; /** Paint the readings of a chip's ruby words (`VDTChip.readings`, #1244); * `x` is the chip box's left edge. */ export declare function paintChipReadings(ctx: Ctx, runs: readonly VDTAnnotationRun[], x: number, baseline: number, color: string): void; /** Paint a ruby base's reading; `x` is where the base's segment starts. */ export declare function paintRuby(ctx: Ctx, ruby: VDTRuby, x: number, baseline: number, textColor: string): void; /** Paint a character's kanbun marks (返り点, 送り仮名, 竪点, #430); `x` is * where its segment starts. */ export declare function paintKunten(ctx: Ctx, kunten: VDTKunten, x: number, baseline: number, textColor: string): void; /** Paint a warichu note's rows; `x` is where the note's segment starts. */ export declare function paintWarichu(ctx: Ctx, warichu: VDTWarichu, x: number, baseline: number, textColor: string): void; /** Paint a footnote marker set in the line gap (`VDTLineSegment.sideMarker`, * JLReq §4.2.3); `x` is where its segment starts. */ export declare function paintSideMarker(ctx: Ctx, marker: NonNullable, x: number, baseline: number, color: string): void; export {}; //# sourceMappingURL=annotations.d.ts.map