Stroke

Stroke

{Object} Stroke Stroke properties of associated object

Constructor

new Stroke(color, type, segments, alpha, width)

Description:
  • Create a stroke
Source:
Properties:
Name Type Attributes Default Description
color Object <optional>
<Rgb> Color model & value
type string <optional>
'solid' Stroke type; 'solid' || 'dashed'
segments Array.<number> <optional>
[5, 5] Dashed line segment distance(s)
width number <optional>
2 Thickness of stroke
shadow Shadow Shadow properties
Parameters:
Name Type Description
color Object RGB color value
type string Stroke type
segments Array.<number> Dashed line segment distance(s)
alpha number Alpha value; number/decimal
width number Thickness of stroke

Methods

color(value)

Description:
  • Set color value
Source:
Parameters:
Name Type Description
value Rgb Color model

color() → {Rgb}

Description:
  • Get color value
Source:
Returns:
Color model
Type
Rgb

segments(value)

Description:
  • Set segment value
Source:
Parameters:
Name Type Description
value Array.<number> Dashed line segment distance(s)

segments() → {Array.<number>}

Description:
  • Get segment value
Source:
Returns:
Dashed line segment distance(s)
Type
Array.<number>

type(value)

Description:
  • Set type
Source:
Parameters:
Name Type Description
value string Stroke type: 'solid' || 'dashed'

type() → {string}

Description:
  • Get type
Source:
Returns:
Stroke type: 'solid' || 'dashed'
Type
string

width(value)

Description:
  • Set width value
Source:
Parameters:
Name Type Description
value number Thickness of stroke

width() → {number}

Description:
  • Get width value
Source:
Returns:
Thickness of stroke
Type
number