blob: 09e8db95aab1c5bc3210216bf490e9827bb5219c [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>Test drawImage(image) with canvas with different composite modes.</title>
<script src="resources/canvas-composite-image-common.js"></script>
<script type="application/x-javascript">
function drawImage(context, compositeIndex, alpha) {
context.globalCompositeOperation = compositeTypes[compositeIndex];
if (alpha)
context.globalAlpha = 0.5;
var imageElement = document.getElementById('image');
context.drawImage(imageElement, 10, 10);
}
function setupTest() {}
</script>
<style type="text/css">
body { margin: 5px; font-family: arial,verdana,helvetica; background: #fff; }
canvas { border: 1px solid #999; }
div { margin: 10px; }
#output h1 { font-size: medium; font-weight: normal; }
#output h2 { font-size: small; font-weight: normal; }
#output div { font-size: small; margin: 0px; }
#output .pass { color: green; }
#output .fail { color: rgb(255, 0, 0); }
#output .error { color: rgb(255, 0, 64); }
td { padding: 2px 5px; }
table { border-collapse: collapse; }
</style>
</head>
<body onload='runTest("dumpAsText");'>
<div>Test Results</div>
<div><table id='outputtable'></table></div>
<div>Test Image</div>
<div><img id = "image" src="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAJYAAAA8CAIAAAAL5NQ9AAAACXBIWXMAAAsTAAALEwEAmpwY
AAAAB3RJTUUH2woaBQc4oLEFpAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeB
DhcAAACMSURBVHja7dNBEYAgFEVRPhHMYgAzUIsmVnFvB/fsoQb+ObfBmzMvxneW1D1vzz2w
FiEUQiFEKIRCKIQIhVAIhRChEAqhECIUQiEUQoRCKIRCiFAIhVAIEep3xTWTLzzu5oVCKIRC
iFAIhVAIEQqhEAohQiEUQiFEKIRCKIQIhVAIhRChEAqhECLUZi3VEwcBMGr1NgAAAABJRU5E
rkJggg==
"></div>
<div>Test Output</div>
<div id='output'></div>
</body>
</html>