Property:
globalCompositeOperation:

Canvas:
your browser does not support the canvas tag
Code:
var mycanvas;
var ctx;
mycanvas=new canvas(430,280,"main");

ctx=mycanvas.contex;
ctx.fillStyle='blue';
ctx.fillRect(10,10,50,50);
ctx.globalCompositeOperation='source-atop';
ctx.beginPath();
ctx.fillStyle='red';
ctx.arc(50,50,30,0,2*Math.PI);
ctx.fill();
Click the property values above to see the result