StrokeOptions

The shape stroke configuration options.

color?

string

The stroke color in any of the following formats.

ValueDescription
redThe basic or extended CSS Color name
#ff0000The Hex RGB value
rgb(255, 0, 0)The RGB value

Specifying 'none', 'transparent' or '' (an empty string) clears the stroke.

dashType?

DashType

(default: "solid") The stroke dash type.

lineCap?

LineCap

(default: "butt") The stroke line cap style.

lineJoin?

LineJoin

(default: "miter") The stroke line join style.

opacity?

number

The stroke opacity. Ranges from zero (completely transparent) to one (completely opaque).

width?

number

The stroke width in pixels.

In this article

Not finding the help you need?