Pilates
    Preparing search index...
    Index

    Constructors

    Properties

    height: number
    width: number

    Methods

    • Fill a single row with ' ' cells of the given style. Cheaper than calling setGrapheme per cell because it skips the per-cell stringWidth(' ') lookup, the in-bounds check, and the wide-char continuation-cell branch — none of which fire for plain space. Used by the painter to lay down a background colour or attribute strip before the actual text characters get written on top.

      Parameters

      • x: number
      • y: number
      • width: number
      • style: CellStyle

      Returns void

    • Pop the most recent scissor. Calling with an empty stack is a no-op.

      Returns void

    • Push a clipping rect onto the scissor stack. Subsequent cell writes are filtered through the intersection of the current stack — writes outside the active rect are dropped silently. Pair every push with a popScissor().

      Parameters

      • rect: ClipRect

      Returns void

    • Set a single cell. Caller must respect wide-char invariants.

      Parameters

      • x: number
      • y: number
      • cell: Cell

      Returns void

    • Write a single grapheme cluster at (x, y). Wide characters consume two cells; the second cell is marked as a continuation (width 0).

      Parameters

      • x: number
      • y: number
      • char: string
      • style: CellStyle

      Returns void

    • Plain ASCII output (no ANSI), useful for snapshots.

      Returns string

    • Convert the frame to a printable string. When ansi is true (default), SGR sequences are emitted on style changes; when false, only characters (no escapes) are emitted.

      Parameters

      • opts: { ansi?: boolean } = {}

      Returns string

    • Write a string at (x, y), splitting into grapheme clusters and respecting wide-char widths. Returns the cell width consumed (may be less than the string's natural width if it would overflow). Any cluster that would cross the right edge is dropped.

      Parameters

      • x: number
      • y: number
      • text: string
      • style: CellStyle

      Returns number