<canvas width="700" height="500"></canvas>
<script>
function desenhaEsquadro(ax,ay,cx,cy,cor){
var tela = document.querySelector('canvas');
var pincel = tela.getContext('2d');
pincel.fillStyle = cor;
pincel.beginPath();
pincel.moveTo(ax,ay);
pincel.lineTo(ax,cy);
pincel.lineTo(cx,cy);
pincel.fill();
}
desenhaEsquadro(50,50,400,400,'black');
desenhaEsquadro(100, 175, 275, 350, 'white');
</script>