<canvas width = "600" height="400"></canvas>
<script>
var tela = document.querySelector('canvas')
var pincel = tela.getContext('2d');
pincel.fillStyle = "green";
pincel.fillRect(100, 100, 500, 300);
pincel.fillStyle = 'yellow';
pincel.beginPath();
pincel.moveTo(350, 130);
pincel.lineTo(150, 250);
pincel.lineTo(350, 370);
pincel.lineTo(550, 250);
pincel.fill();
pincel.fillStyle = 'darkblue';
pincel.beginPath();
pincel.arc(350, 250, 80, 0, 2 * 3.14);
pincel.fill();
</script>