https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 81cd21da1bc6a665a2b8a3439a065aa00dd5c14b authored by Aryeh Gregor on 26 October 2016, 13:20:08 UTC
Remove more numbers from test names
Tip revision: 81cd21d
drawimage_canvas_3_ref.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
</head>
<style>
  html, body {
    margin: 0;
  }
  canvas {
    display: block;
  }
</style>
<body>
<canvas id="dest" height="100" width="100"></canvas>
<script type="text/javascript">

var sourceWidth = 50;
var sourceHeight = 50;
var destCanvas = document.getElementById('dest');
var destCtx = destCanvas.getContext('2d');
destCtx.fillStyle = "#FF0000";
destCtx.fillRect(0, 0, destCanvas.width, destCanvas.height);
destCtx.fillStyle = "#00FFFF";
destCtx.fillRect(50, 50, sourceWidth, sourceHeight);
destCtx.fillStyle = "#000000";
destCtx.fillRect(55, 55, 40, 40);

</script>
</body>
</html>
back to top