Skip to content

Line Join

The lineJoin property represents the style of the joint between two line segments.

Possible line join optionsDescription
Graphics.LineJoin.BEVELCreates a bevel
Graphics.LineJoin.ROUNDCreate a fillet
Graphics.LineJoin.MITERDefault. Create sharp corners

Example

ts
const ctx = node.getComponent(Graphics);
ctx.lineJoin = Graphics.LineJoin.ROUND;
ctx.moveTo(20,20);
ctx.lineTo(100,50);
ctx.lineTo(20,100);
ctx.stroke();

lineJoin.png


Return to the Graphics Component Reference documentation.