CanvasContext.setStrokeStyle

Set the style of stroke. By default, it is black.

Parameters

It is Object type.

PropertyTypeDescription
colorColorThe color.

Sample Code

copy
const ctx = my.createCanvasContext('awesomeCanvas')
ctx.setStrokeStyle('blue')
ctx.strokeRect(50, 50, 100, 175)
ctx.draw()