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

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

Issue 1175403002: Expose and use constants for DrawLooperLayerInfo.setPaintBits to dart. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: 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/DrawLooperLayerInfo.idl ('k') | sky/examples/raw/shadow.dart » ('j') | 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 03d2d02fd6ab8d2c608c4f84703724246db29ab4..61e43a9cdcf60974c01a951273ae61fd189f10fa 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -51,7 +51,7 @@ void main() {
new DrawLooperLayerInfo()
..setOffset(const Point(150.0, 0.0))
..setColorMode(TransferMode.srcMode)
- ..setPaintBits(-1),
+ ..setPaintBits(PaintBits.all),
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
layerPaint.setColorFilter(
@@ -64,13 +64,16 @@ void main() {
new DrawLooperLayerInfo()
..setOffset(const Point(75.0, 75.0))
..setColorMode(TransferMode.srcMode)
- ..setPaintBits(-1),
+ ..setPaintBits(PaintBits.shader),
(Paint layerPaint) {
Gradient redYellow = new Gradient.radial(
new Point(0.0, 0.0), radius/3.0,
[const Color(0xFFFFFF00), const Color(0xFFFF0000)],
null, TileMode.mirror);
layerPaint.setShader(redYellow);
+ // Since we're don't set PaintBits.maskFilter, this has no effect.
+ layerPaint.setMaskFilter(
+ new MaskFilter.blur(BlurStyle.normal, 50.0, highQuality: true));
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)),
« no previous file with comments | « sky/engine/core/painting/DrawLooperLayerInfo.idl ('k') | sky/examples/raw/shadow.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698