Returns a new immutable VectorStroke that snapshots the current builder state. The builder remains usable afterward; the returned stroke is an independent snapshot.
StaticcreateCreates a builder for a stroke with the given width. Throws if width is
not greater than 0, or if width is not finite.
The stroke width (Number, must be > 0), in composite coordinate space.
StaticgetReturns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Sets the VectorComposite.LineCap — how the ends of open sub-paths and dash segments are rendered. Defaults to Butt (the SVG default).
The line cap style.
Sets an optional dash pattern. pattern is an array of finite,
non-negative Numbers defining alternating on/off segment lengths; an empty
array (the default) means a continuous stroke. offset is a finite phase
offset into the pattern. An odd-length pattern is valid — ThorVG/SVG repeat
it to an even length internally. Throws if any pattern entry is negative or
not finite, or if offset is not finite.
An array of alternating on/off lengths (each >= 0, finite); empty = no dashing.
Phase offset into the pattern (Number, finite).
Sets the VectorComposite.LineJoin — how corners between connected path segments are rendered. Defaults to Miter (the SVG default).
The line join style.
Sets the miter limit — the ratio at which a
Miter join falls back to a bevel.
Must be finite and >= 1. Defaults to 4 (the SVG default).
Throws if limit is less than 1, or if limit is not finite.
The miter limit (Number, must be >= 1).
A mutable builder for an immutable VectorStroke style. Start one with VectorStrokeBuilder.create, optionally refine with VectorStrokeBuilder#setCap, VectorStrokeBuilder#setJoin, VectorStrokeBuilder#setMiterLimit, and VectorStrokeBuilder#setDash, then call VectorStrokeBuilder#build to produce the stroke. The builder remains usable after
build().Since
Lens Scripting Version 370
Snap OS
Example