发现正在使用废弃接口 createCanvasContext.setStroke

发布于 8 年前作者 byang1174 次浏览最后编辑 8 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

说正在使用废弃接口 createCanvasContext.setStroke,谁知道新的接口是什么?

1 回复
xiuying41
xiuying411 楼6 年前

CanvasContext.setStrokeStyle(Color color)

从基础库 1.9.90 开始,本接口停止维护,请使用 CanvasContext.strokeStyle 代替

ctx.strokeStyle = “red”