Preparing search index...

    Class VectorStroke

    An immutable stroke style — width, line cap, line join, miter limit, and an optional dash pattern. Produced by VectorStrokeBuilder#build and never mutated after. A stroke carries only style (no path geometry), so it is freely shareable: pass the same VectorStroke to multiple VectorCompositeBuilder#addStroke calls to stroke several paths with one style. Exposes read-only metadata — VectorStroke#width, VectorStroke#cap, VectorStroke#join, VectorStroke#miterLimit, and VectorStroke#dashed.

    Lens Scripting Version 370

    var sb = VectorStrokeBuilder.create(6);
    sb.setCap(VectorComposite.LineCap.Round);
    sb.setJoin(VectorComposite.LineJoin.Round);
    sb.setDash([24, 12], 0);
    var stroke = sb.build();
    print(stroke.width); // 6
    print(stroke.dashed); // true

    Hierarchy (View Summary)

    Index

    Properties

    cap: LineCap

    The VectorComposite.LineCap — how the ends of open sub-paths and dash segments are rendered.

    Lens Scripting Version 370

    dashed: boolean

    Whether this stroke is dashed — true when an explicit dash pattern is set, false for a continuous line (the default).

    Lens Scripting Version 370

    join: LineJoin

    The VectorComposite.LineJoin — how corners between connected path segments are rendered.

    Lens Scripting Version 370

    miterLimit: number

    The miter limit — controls when a Miter join falls back to a bevel. Always greater than or equal to 1.

    Lens Scripting Version 370

    width: number

    The stroke width in the composite's coordinate space. Always greater than 0.

    Lens Scripting Version 370

    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 370

    • 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