求助
发布于 5 年前 作者 fliao 13182 次浏览 来自 问答

https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.draw.html

ctx.draw()

使用  ctx.fill() 画出来的是矩形 ctx.stroke() 调用无效    ctx.draw() 一直就是报错 文档也没写

3 回复

如果你用的小程序canvas 2d接口,按文档上的说明,用法是跟web canvas api是一样的,应该是没有draw这个方法,你需要改回小程序旧版canvas的用法

ctx.draw()  为旧的文档,你可以用新的接口

回到顶部