LineLayout Class @beta
Represents the layout of a single line within a paragraph of a text block. Contains a sequence of RunLayout objects, the computed range of the line, and its offset from the document origin. Provides utilities for appending runs, computing ranges, and converting to result objects.
Methods
Name | Description | |
---|---|---|
constructor(source: Paragraph): LineLayout | ||
append(run: RunLayout): void | ||
stringify(): string | Compute a string representation, primarily for debugging purposes. | |
toResult(textBlock: TextBlock): LineLayoutResult |
Properties
Name | Type | Description | |
---|---|---|---|
back Accessor ReadOnly | RunLayout | ||
isEmpty Accessor ReadOnly | boolean | ||
justificationRange | Range2d | ||
offsetFromDocument | { x: number, y: number } | ||
range | Range2d | ||
runs Accessor ReadOnly | ReadonlyArray<RunLayout> | ||
source | Paragraph |
Defined in
Last Updated: 27 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.