brilliant-msg
    Preparing search index...

    Class PageData

    Represents a single, measured page of text that is ready to be rasterized into sprites.

    Index

    Constructors

    Accessors

    • get isEmpty(): boolean

      Returns true if the page contains no lines.

      Returns boolean

    • get isRasterized(): boolean

      Returns true if the page has been rasterized into sprites.

      Returns boolean

    • get lineTexts(): string[]

      The text for each measured line.

      Returns string[]

    Methods

    • Packs the page layout data for transmission to the device. Must be called after rasterize(). Format: 0xFF (1 byte) layout.width (2 bytes, big-endian) layout.height (2 bytes, big-endian) numSprites (1 byte) [xOffset_h, xOffset_l, yOffset_h, yOffset_l] * numSprites

      Returns Uint8Array

    • Rasterizes the measured lines into TxSprite objects (one per line) using 1-bit monochrome rendering via the Canvas 2D API.

      Returns Promise<void>

    • Composes all rasterized sprites into a single layout.width × layout.height canvas and returns a PNG as a Uint8Array. Calls rasterize() first if not already done.

      Returns Promise<Uint8Array<ArrayBufferLike>>