微信小程序API绘图setStrokeStyle,设置微信小程序线条样式
2017-12-22
导读:绘图接口和方法 canvasContext.setStrokeStyle 定义 设置边框颜色。 Tip : 如果没有设置 fillStyle ,默认颜色为 black 。 参数 参数 类型 定义 color Color Gradient Object 填充色 例子 const ctx = wx.createCa...
canvasContext.setStrokeStyle
定义
设置边框颜色。
Tip: 如果没有设置fillStyle
,默认颜色为black
。
参数
参数 | 类型 | 定义 | |
---|---|---|---|
color | Color | Gradient Object | 填充色 |
例子
const ctx = wx.createCanvasContext('myCanvas')
ctx.setStrokeStyle('red')
ctx.strokeRect(10, 10, 150, 75)
ctx.draw()
更多微信小程序开发教程,可以关注hi小程序。
第二部分:如何开通一个小商店