What Can Be Done About 3 Gotchas in IE9 Beta



ctx.strokeStyle = 'rgba(255, 0, 0, 1)';

ctx.lineWidth = 10;

ctx.globalCompositeOperation = 'source-over';



ctx.beginPath();

ctx.moveTo(0, 0);

ctx.lineTo(100, 100);

ctx.stroke();



ctx.strokeStyle = 'rgba(0, 255, 0, 1)';

ctx.globalCompositeOperation = 'destination-out';



ctx.beginPath();

ctx.moveTo(0, 100);

ctx.lineTo(100, 0);

ctx.stroke();





// Start with a canvas that is 100x100px

ctx.strokeStyle = 'rgba(255, 0, 0, 1)';

ctx.lineWidth = 10;



ctx.beginPath();

ctx.moveTo(0, 0);

ctx.lineTo(100, 100);

ctx.stroke();



jQuery('#testCanv').width(101).height(101);



ctx.strokeStyle = 'rgba(0, 255, 0, 1)';

ctx.beginPath();

ctx.moveTo(0, 100);

ctx.lineTo(100, 0);

ctx.stroke();





// ... snip

ctx.stroke();



var tmpData = ctx.getImageData(0, 0, 100, 100);

jQuery('#testCanv').width(101).height(101);

ctx.putImageData(tmpData, 0, 0);

ctx.lineWidth = 10;



ctx.strokeStyle = 'rgba(0, 255, 0, 1)';

// snip ...





ctx.lineWidth = 10;



ctx.shadowColor = 'rgba(255, 0, 0, 1)';

ctx.shadowBlur = 40;

ctx.shadowOffsetX = 10000;

ctx.shadowOffsetY = 0;



ctx.beginPath();

ctx.moveTo(-10000, 0);

ctx.lineTo(-9900, 100);

ctx.stroke();

