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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-shadow-expected.html
diff --git a/third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-shadow-expected.html b/third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-shadow-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..77b78b9ba17582d0122516df86cddf6a3afaec70
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/csspaint/paint2d-gradient-shadow-expected.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id ='output' width='500' height='500'></canvas>
+<script>
+var aCanvas = document.getElementById('output');
+var ctx = aCanvas.getContext('2d');
+
+var fillShape = function(x, y) {
+ ctx.beginPath();
+ ctx.arc(x, y, 100, 0, Math.PI*2, true);
+ ctx.arc(x, y, 50, 0, Math.PI*2, false);
+ ctx.fill();
+};
+
+var gradient = ctx.createLinearGradient(0, 0, 300, 0);
+gradient.addColorStop(0, 'rgba(0, 0, 255, 0.5)');
+gradient.addColorStop(1, 'rgba(0, 0, 255, 0.5)');
+
+ctx.save();
+ctx.fillStyle = gradient;
+ctx.shadowColor = 'rgba(255, 0, 0, 0.5)';
+ctx.shadowOffsetX = 250;
+
+// Alpha shadow.
+ctx.shadowBlur = 0;
+fillShape(150, 150);
+
+// Blurry shadow.
+ctx.shadowBlur = 10;
+fillShape(150, 400);
+
+ctx.restore();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698