strokedSegment
A straight line between two points, solid, dashed or dotted, with square or round ends.
strokedSegment(slots: StrokedSegmentSlots): Paint
Import figures from shaders/std and use figures.strokedSegment.
Dashes and dots are spaced so the pattern lands exactly on both endpoints. The edge stays antialiased at any thickness. Style and cap inputs are numbers, so give a select prop a transform that maps its labels to them, or pass the number directly.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | StrokedSegmentSlots |
Example
paint: strokedSegment({from: p('pointA'), to: p('pointB'), width: p('thickness'), style: 1, dashLength: p('dashLength'), gapLength: p('gapLength'), capStart: 1, capEnd: 1, color: p('color')})
See also
sineStroke— A wavy line that travels along itself, drawn as a soft band.