Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.layer.shadow-from-outside-canvas.long-distance-with-clipping</title>
<h1>2d.layer.shadow-from-outside-canvas.long-distance-with-clipping</h1>
<p class="desc">Checks shadow produced by object drawn outside the canvas</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext('2d');
const delta = 10000;
const clipRegion = new Path2D();
clipRegion.rect(20, 20, 160, 160);
ctx.clip(clipRegion);
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 100, 100);
</script>