Tag Archives: HTML canvas globalCompositeOperation

HTML canvas globalCompositeOperation

Why is a clear technical challenge behind the “OMG buys it?”.> >

< Script > <

was c=document.getElementById(“myCanvas”);
was ctx=c.getContext(“2d”);<
ctx.fillStyle=”red”;
ctx.fillStyle=”red br> ctx.fillRect(20,20,75,50);
ctx.globalCompositeOperation=”source-over”; ctx.fillRect(50,50,75,50); <
ctx.fillStyle=”red”;
ctx.fillStyle=”red br> ctx.fillRect(150.20.75.50);
ctx.globalCompositeOperation=”destination-over”; ctx.fillRect(180.50.75.50);

</ Script >

http://www.runoob.com/jsref/prop-canvas-globalcompositeoperation.html

<! DOCTYPE html >
< html >
<

<& Edit lt;/
</
< body onload=”draw(‘canvas’)”>
lt;/ canvas >