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

Unified Diff: sky/examples/raw/painting.sky

Issue 1169863002: Sky: Added radial gradients. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: rebase Created 5 years, 6 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
« no previous file with comments | « sky/engine/core/painting/Shader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/painting.sky
diff --git a/sky/examples/raw/painting.sky b/sky/examples/raw/painting.sky
index b0731a95594e355902cbb00aa228826bebc1e952..7c06e5bf8f4d760448174d0a05392f642c114e7f 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -64,9 +64,14 @@ void main() {
..addLayerOnTop(
new DrawLooperLayerInfo()
..setOffset(const Point(75.0, 75.0))
- ..setColorMode(TransferMode.srcMode),
+ ..setColorMode(TransferMode.srcMode)
+ ..setPaintBits(-1),
(Paint layerPaint) {
- layerPaint.color = const Color.fromARGB(128, 255, 0, 0);
+ Gradient redYellow = new Gradient.Radial(
+ new Point(0.0, 0.0), radius,
+ [const Color(0xFFFFFF00), const Color(0xFFFF0000)],
+ null);
+ layerPaint.setShader(redYellow);
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)),
« no previous file with comments | « sky/engine/core/painting/Shader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698