SheetXL - v0.3.20
    Preparing search index...

    Interface ITextFrame

    Represents a rectangular container for text and its formatting within a document.

    A TextFrame allows precise control over the positioning, size (width and height), layout, and appearance of text content.

    interface ITextFrame {
        bounds: Readonly<Bounds>;
        horizontalCentered: boolean;
        presetTextWarp: string;
        textBounds: Readonly<Bounds>;
        createTemporaryTextFrame(text: string, allowWrap?: boolean): ITextFrame;
        layout(dimensions?: Partial<Dimensions>): ITextFrame;
        visitLines(visitor: TextVisitor): void;
        visitParas(visitor: TextVisitor): void;
    }
    Index

    Properties

    bounds: Readonly<Bounds>

    This is the bound of a textfield include any whitespace

    horizontalCentered: boolean

    This is different then center aligned text.

    presetTextWarp: string

    Returns the presetTextWarp. TODO - implement this.

    textBounds: Readonly<Bounds>

    This is the bound of a text not include whitespace

    Methods

    • Creates a simple text frame that can be used for rendering and/or measuring.

      Parameters

      • text: string

        The text to use

      • OptionalallowWrap: boolean

        If true then will try to wrap on natural breaks. Defaults the the current settings.

      Returns ITextFrame

    • Before using the bounds of a textFrame the layout must be called. This will then return a a clone of this ITextFrame that can be placed and rendered.

      Parameters

      • Optionaldimensions: Partial<Dimensions>

        will cause the text to wrap. If bounds are not specified or only a dimension then it will not wrap.

      Returns ITextFrame

    • Parameters

      • visitor: TextVisitor

      Returns void

    • Parameters

      • visitor: TextVisitor

      Returns void