html5 - 关于canvas的save( );和restore( );方法的一个疑惑
PHPz
PHPz 2017-04-17 13:51:14
0
3
331

如上4图
第二次lineWidth设置比第一次lineWidth设置的值大后
就会导致第一次画出的线段的lineWidth受到影响
请教各位前端大神有什么好的处理方案,可以使得第一次的lineWidth不受影响

PHPz
PHPz

学习是最好的投资!

reply all(3)
迷茫

The problem is solved
because the .beginPath() method is not added
If you add .beginPath() without save(); and restore();, that’s fine too

PHPzhong

The path requires closePath

Ty80

BeginPath should be added when drawing lines

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!