WeChat applet API drawing setStrokeStyle (set line style)
setStrokeStyle
Definition
Set the border color.
Tip: If fillStyle
is not set, the default color is black
.
Parameters
Parameters | Type | Definition | |
---|---|---|---|
color | Color \ | Gradient Object | fill color |
Example
const ctx = wx.createCanvasContext('myCanvas') ctx.setStrokeStyle('red') ctx.strokeRect(10, 10, 150, 75) ctx.draw()