Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-shadow-expected.html

Issue 1834843002: [WIP] Plumbing for paint Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: \o/\o/ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <canvas id ='output' width='500' height='500'></canvas>
5 <script>
6 var aCanvas = document.getElementById('output');
7 var ctx = aCanvas.getContext('2d');
8
9 var fillShape = function(x, y) {
10 ctx.beginPath();
11 ctx.arc(x, y, 100, 0, Math.PI*2, true);
12 ctx.arc(x, y, 50, 0, Math.PI*2, false);
13 ctx.fill();
14 };
15
16 var gradient = ctx.createLinearGradient(0, 0, 300, 0);
17 gradient.addColorStop(0, 'rgba(0, 0, 255, 0.5)');
18 gradient.addColorStop(1, 'rgba(0, 0, 255, 0.5)');
19
20 ctx.save();
21 ctx.fillStyle = gradient;
22 ctx.shadowColor = 'rgba(255, 0, 0, 0.5)';
23 ctx.shadowOffsetX = 250;
24
25 // Alpha shadow.
26 ctx.shadowBlur = 0;
27 fillShape(150, 150);
28
29 // Blurry shadow.
30 ctx.shadowBlur = 10;
31 fillShape(150, 400);
32
33 ctx.restore();
34 </script>
35 </body>
36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698