stroke

stroke() 方法会实际地绘制出通过 moveTo() 和 lineTo() 等路径方法定义的路径。默认颜色是黑色。

实例

var ctx = node.getComponent(Graphics);
ctx.moveTo(20,100);
ctx.stroke(20,20);
ctx.stroke(70,20);
ctx.stroke();


返回 Graphics 组件参考

results matching ""

    No results matching ""