figureone
    Preparing search index...

    Type Alias TypeParsableRect

    TypeParsableRect:
        | [number, number, number, number]
        | Rect
        | TypeF1DefRect
        | string

    A Rect can be defined with either

    • an instantiated Rect
    • an array of left, bottom, width, height values [number, number, number, number]
    • a recorder state definition TypeF1DefRect
    • a string representation of all options except the first
    // All rectangles are the same when parsed by `getRect` and have a lower
    left corner of `(-2, -1)`, a width of `4`, and a height of `2`
    const r1 = Fig.getRect([-2, -1, 4, 2]);
    const r2 = new Fig.Rect(-2, -1, 4, 2);
    const r3 = Fig.getRect('[-2, -1, 4, 2]');