# CanvasContext.setStrokeStyle(string|CanvasGradient color)

From base library 1.9.90 Start, this interface stops maintenance, please use CanvasContext.strokeStyle replace

with Promise style call: Not supported

Mini Program plugin: Support

Set stroke color.

# parameter

# string|CanvasGradient color

The color of the stroke, the default color is black。

# Code examples

const ctx = wx.createCanvasContext('myCanvas')
ctx.setStrokeStyle('red')
ctx.strokeRect(10, 10, 150, 75)
ctx.draw()

The translations are provided by WeChat Translation and are for reference only. In case of any inconsistency and discrepancy between the Chinese version and the English version, the Chinese version shall prevail.Incorrect translation. Tap to report.