зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1201272 - add reftest for canvas shadows with destination-out op. r=jmuizelaar
--HG-- extra : rebase_source : 12cd30c3837dc69c16133b2cee0f131da65a19f5
This commit is contained in:
Родитель
3188abf696
Коммит
73216ad949
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script>
|
||||
function draw() {
|
||||
var ctx = document.getElementById('c').getContext('2d');
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 74, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
|
||||
ctx.globalCompositeOperation = 'destination-out';
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 40, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
|
||||
ctx.globalCompositeOperation = 'source-over';
|
||||
ctx.lineWidth = 10;
|
||||
ctx.strokeStyle = 'green';
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 40, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload='draw()' style='background: white;'>
|
||||
<canvas id='c' width='200' height='200'></canvas>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script>
|
||||
function draw() {
|
||||
var ctx = document.getElementById('c').getContext('2d');
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 74, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
|
||||
ctx.globalCompositeOperation = 'destination-out';
|
||||
ctx.shadowColor = 'rgba(0, 0, 0, 0.8)';
|
||||
ctx.shadowBlur = 3;
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 40, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
ctx.shadowBlur = 0;
|
||||
|
||||
ctx.globalCompositeOperation = 'source-over';
|
||||
ctx.lineWidth = 10;
|
||||
ctx.strokeStyle = 'green';
|
||||
ctx.beginPath();
|
||||
ctx.arc(75, 75, 40, 0, 2 * Math.PI);
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload='draw()' style='background: white;'>
|
||||
<canvas id='c' width='200' height='200'></canvas>
|
||||
</body>
|
||||
</html>
|
|
@ -105,3 +105,4 @@ fuzzy-if(azureQuartz,2,128) fuzzy-if(d2d,12,21) fuzzy-if(d2d&&/^Windows\x20NT\x2
|
|||
== 802658-1.html 802658-1-ref.html
|
||||
fuzzy-if(Mulet,45,2) == 1107096-invisibles.html 1107096-invisibles-ref.html
|
||||
== 1151821-1.html 1151821-1-ref.html
|
||||
== 1201272-1.html 1201272-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче