brilliant-msg
    Preparing search index...

    Class TxTextPage

    Manages the process of laying out and rasterizing text into pages. It works with any TextLayout to support different display shapes.

    Index

    Constructors

    Properties

    layout: TextLayout

    The layout used for text rendering.

    text: string

    The full original text.

    Accessors

    • get hasMoreText(): boolean

      Returns true if there is more text to be laid out.

      Returns boolean

    • get remainingText(): string

      The portion of the text that has not yet been processed into a page.

      Returns string

    Methods

    • Measures the next page of text using the Canvas 2D API and returns a PageData without rasterizing any sprites. Returns null if there is no remaining text or if no text fits on the page.

      Returns Promise<null | PageData>

    • Measures and rasterizes the next page in one call. Returns null if there is no remaining text or nothing fit on the page.

      Returns Promise<null | PageData>