<canvas id="canvas" width="400" height="180"></canvas>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(102, 0);
ctx.lineTo(282, 122);
ctx.lineTo(45, 172);
ctx.lineTo(0, 123);
ctx.lineTo(32, 35);
ctx.closePath();
ctx.moveTo(33, 95);
ctx.lineTo(157, 138);
ctx.lineTo(140, 46);
ctx.closePath();
ctx.fillStyle = "orange";
ctx.fill('evenodd');
ctx.strokeStyle = "red";
ctx.setLineDash([10]);
ctx.stroke();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.