TextBlockLayout Class @beta

Describes the layout of a text block as a collection of lines containing runs. Computes the visual layout of the text block, including word wrapping, justification, and margins. Provides access to the computed lines, ranges, and utilities for converting to result objects.

Methods

Name Description
constructor(source: TextBlock, context: LayoutContext): TextBlockLayout    
stringify(): string Compute a string representation, primarily for debugging purposes.  
toResult(): TextBlockLayoutResult    

Properties

Name Type Description
lines LineLayout[]    
range Range2d The range including margins of the TextBlock.  
source TextBlock    
textRange Range2d @internal: This is primarily for debugging purposes.  

Defined in

Last Updated: 27 June, 2025