vyaz-monorepo / renderers/src / CharPos
Interface: CharPos
Defined in: renderers/src/interactive.ts:21
A resolved character position within the layout tree.
Contains enough context for cursor placement, selection start/end, and hit-testing.
Properties
charIndex
charIndex:
number
Defined in: renderers/src/interactive.ts:27
Index of the character within the span text (0-based).
line
line:
Line
Defined in: renderers/src/interactive.ts:37
Reference to the owning Line.
lineIndex
lineIndex:
number
Defined in: renderers/src/interactive.ts:23
Index of the line in the lines array (0-based).
pIdx
pIdx:
number
Defined in: renderers/src/interactive.ts:29
Paragraph index (from Span.pIdx).
span
span:
Span
Defined in: renderers/src/interactive.ts:39
Reference to the owning Span.
spanIndex
spanIndex:
number
Defined in: renderers/src/interactive.ts:25
Index of the span within the line (0-based).
width
width:
number
Defined in: renderers/src/interactive.ts:35
Character advance width in px (from glyphAdvances or estimated).
x
x:
number
Defined in: renderers/src/interactive.ts:31
Absolute X position of the character's left edge (CSS px).
y
y:
number
Defined in: renderers/src/interactive.ts:33
Absolute Y position of the character's baseline (CSS px).
