标题:
微信小程序API 绘图setFontSize(设置字号)
[打印本页]
作者:
vicky.yu
时间:
5 天前 10:50
标题:
微信小程序API 绘图setFontSize(设置字号)
canvasContext.setFontSize
定义
设置字体的字号。
参数
参数 类型 说明
fontSize Number 字体的字号
例子
const ctx = wx.createCanvasContext('myCanvas')
ctx.setFontSize(20)
ctx.fillText('20', 20, 20)
ctx.setFontSize(30)
ctx.fillText('30', 40, 40)
ctx.setFontSize(40)
ctx.fillText('40', 60, 60)
ctx.setFontSize(50)
ctx.fillText('50', 90, 90)
ctx.draw()
微信小程序 canvas接口和方法绘图接口和方法
欢迎光临 赛捷软件论坛 (http://sagesoft.cn/bbs/)
Powered by Discuz! 7.2