Style
Stroke
How an outline is drawn: width, color, dash pattern and line caps.
Object type style pins
A Stroke describes how a shape's outline or a line is drawn: its width,
its color, a dash pattern (dashStyle) and the caps at the ends of
lines and dashes. The color is a Paint: a
Color or a gradient.
Hierarchy
- Parents
- None
- Subtypes
- None
Properties
| Name | Type | Notes |
|---|---|---|
| width | number | |
| color | Paint | |
| dashStyle | StrokeDash | |
| caps | StrokeCaps |
Nodes
Break Stroke
Node id break/Stroke
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Stroke | type default |
Outputs
| Name | Type | Notes |
|---|---|---|
| width | number | |
| color | Paint | |
| dashStyle | StrokeDash | |
| caps | StrokeCaps |
Make Stroke
Node id make/Stroke
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| width | number | 1 | |
| color | Paint | { r: 0, g: 0, b: 0, a: 1 } | |
| dashStyle | StrokeDash | "SOLID" | |
| caps | StrokeCaps | "round" |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Stroke |
Set Stroke
Node id set/Stroke
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Stroke | type default | |
| width | number | — | |
| color | Paint | — | |
| dashStyle | StrokeDash | — | |
| caps | StrokeCaps | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Stroke |
Lerp Stroke
Node id lerp/Stroke
Inputs
Outputs
| Name | Type | Notes |
|---|---|---|
| result | Stroke |
Notes
- Default. Make Stroke gives a solid black stroke, 1 wide, with round caps.
- Dashes.
dashStyleis one of the StrokeDash presets; custom dash patterns aren't available in graphs. - Gradient strokes. Connect a Make LinearGradient or Make
RadialGradient to Make Stroke's
color. The gradient is in the shape's or line's own units, like a gradient fill, and dashes and caps work as usual. In the inspector an unconnectedcoloris edited as a Color. - Used by every Shape and Line.
Lerp
Lerp Stroke blends the width and the color. Two Colors, or two gradients
of the same kind with as many stops, are blended; any other pair switches
at t = 0.5, from a's color to b's. The dash style and the caps are
a's. t is clamped to 0, 1.