blob: 3a66d2c19725fc6ac2b5884bb60fe3bd503ac272 [file] [edit]
<!DOCTYPE html>
<html>
<body>
<script>
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);
var ctx = canvas.getContext('2d');
canvas.width = 200;
canvas.height = 200;
ctx.fillStyle = "#f00";
ctx.fillRect(0, 0, 100, 200);
ctx.fillStyle = "#000";
ctx.fillRect(100, 0, 100, 200);
</script>
</body>
</html>