Preparing search index...

    Class VectorText

    An immutable text run style — content, size, weight, italics, letter spacing, and horizontalAlignment. Produced by VectorTextBuilder#build and never mutated after. A text run carries only content and style (no color, no placement, no font — the font is the composite's font source), so it is freely shareable: pass the same VectorText to multiple text draw ops to reuse one style across several runs. Exposes read-only metadata — VectorText#text, VectorText#fontSize, and VectorText#horizontalAlignment.

    Lens Scripting Version 374

    var tb = VectorTextBuilder.create("Hello", 48);
    tb.setHorizontalAlignment(HorizontalAlignment.Center);
    var text = tb.build();
    print(text.text); // "Hello"
    print(text.fontSize); // 48

    Hierarchy (View Summary)

    Index

    Properties

    fontSize: number

    The font size, in canvas pixels. Always greater than 0.

    Lens Scripting Version 374

    horizontalAlignment: HorizontalAlignment

    The HorizontalAlignment — where this run sits relative to its baseline position.

    Lens Scripting Version 374

    text: string

    The text content of this run.

    Lens Scripting Version 374

    Methods

    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

      Lens Scripting Version 374

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean