Creator 2.1.2版本,使用Graphics实现触摸绘制的功能(类似画板)。
Line Join和Line Cap均配置为Round。
但是实际使用过程中,如果在一个区域内反复画多次line,会出现莫名其妙的突起效果,如下图所示。

实际绘制,只在红线标注的范围内,实现时,也只对这里面的点进行line后,一次性stroke。
但是却出现了类似Line Join为Miter的效果。
绘制代码如下,为了降低DrawCall,每次绘制都是将画布清除后统一重绘:
private draw(path: cc.Vec2[][]) { this.drawPanel.clear(); path.forEach((line) => { line.forEach((dot, index) => { if (index === 0) { this.drawPanel.moveTo(dot.x, dot.y); } else { this.drawPanel.lineTo(dot.x, dot.y); } }); this.drawPanel.stroke(); }); }
请问,这到底是什么原因?该如何处理?
PS:试过开抗锯齿也没效果
Creator中配置如下:

