Rac. Stroke

Stroke weight and color for drawing.

Can be used as a style object in draw methods to only apply stroke style settings.

The instance applies the weight and color settings as available:

  • when color and weight are set: both stroke settings are applied
  • when weight is 0 and color is set: only stroke color is applied
  • when color is null and weight is larger that 0: only stroke weight is applied
  • when weight is 0 and color is null: a no stroke setting is applied

Constructor

new Stroke(rac, weightnullable, colornullable)

Creates a new Stroke instance.

Parameters:
Name Type Attributes Default Description
rac Rac

Instance to use for drawing and creating other objects

weight number <nullable>

The weight of the stroke, or null to skip weight

color Rac.Color <nullable>
null

A Color for the stroke, or null to skip color