dashArray property

List<double> dashArray
final

Alternating on/off lengths (in the Scene's logical pixel space) the stroke is divided into, e.g. [4, 2] for a 4-on/2-off dash. An empty list (the default) draws a solid stroke. An odd-length list repeats (matching SVG/CSS: [4] behaves like [4, 4]).

Only takes effect on a PathLayer's stroke — a RectangleLayer currently ignores it and always strokes solid, since dashing is resolved into plain path geometry rather than delegated to the native engine (Blend2D's own dash support silently draws a solid line instead — see https://github.com/blend2d/blend2d/issues/48), and a rectangle has no LayerPath of its own to resolve that geometry from.

Implementation

final List<double> dashArray;