Stroke
The stroke()
method draws the previous path generated by path related functions like lineTo
, rect
etc. The color used is strokeColor
and the line width is defined by lineWidth
.
Example
var ctx = node.getComponent(Graphics);
ctx.moveTo(20,100);
ctx.stroke(20,20);
ctx.stroke(70,20);
ctx.stroke();
Return to the Graphics Component Reference documentation.