summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/filters/feComposite-operator-lighter-ref.html
blob: 561ade1582d32ad719ea2afd947e08d51e6ab86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!doctype html>
<style>* { margin: 0; padding: 0; }</style>
<canvas id="canvas" width="200" height="200"></canvas>
<script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var width = canvas.width;
var height = canvas.height;

ctx.globalCompositeOperation = 'lighter';
ctx.fillStyle = '#f00';
ctx.fillRect(0,0,width,height);

gradient = ctx.createLinearGradient(0, 0, 0, height);
gradient.addColorStop(0, "#0f0");
gradient.addColorStop(1, "#00f");
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, width, height);
</script>