$.shape.polygon( ...coords)

Takes pairs of coords to draw a shape connected between them all

  • ...coords : number //

Examples

function update() {
    $.shape.strokeWidth = 3;	
    $.colour.stroke="blue";	
    $.shape.polygon( 
        20, 20,
        40, 60,
        70, 40
    );
    $.shape.polygon( 
        20, 220,
        40, 260,
        70, 240,
        70, 220,
    );
};