blob: 4572d31f055e5a1e4f248f39307d7f1efd551495 [file] [log] [blame]
<canvas id="c" width="200" height="100"></canvas>
<script>
// Test that validates that the shadow offset is not modified when doing a scale
// with or without a filter.
// Note: The color seem pretty randome. That's to add robustness to the test.
const canvas = document.getElementById('c')
const ctx = canvas.getContext('2d')
ctx.filter = 'none';
ctx.shadowOffsetX = 10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'rgba(75,27,42,0.5)';
ctx.fillStyle = 'rgba(27,75,42,0.5)';
ctx.fillRect(0, 0, 40, 40);
ctx.filter = 'hue-rotate(180deg)';
ctx.fillRect(100, 0, 40, 40);
</script>