canvas的 fillStyles属性有概率性的无效?

小程序 文章 2020-07-30 23:41 968 0 全屏看文

AI助手支持GPT4.0

canvas的 fillStyles属性有概率性的无效?

canvas的 fillStyles属性有概率性的无效,出现填充颜色为黑色(不是我定义的两种颜色)的情况

效果如下:。各位大佬,这个是fillStyles属性的锅还是我应用不当导致的?可以解决吗?

The fillstyles property of canvas is invalid in probability. If the fill color is black (not the two colors I defined), the effect is as follows:. Everybody, is this the pot of fillstyles attribute or caused by my improper application? Can it be solved?

回答:

圣殿骑士:

把值先写死看下?

取模运算有可能会翻车哦

-EOF-

AI助手支持GPT4.0