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

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

Issue 1158883004: Add TransferMode to dart:sky, and use it instead of passing ints around. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: rebase Created 5 years, 7 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/TransferMode.dart ('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 195cdf0c702d02f5a0cb78fb5df1d2170d97d384..d8fe8f5eb5df7f8012704264f5cc7795db66eef0 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -44,18 +44,24 @@ void main() {
var builder = new LayerDrawLooperBuilder()
..addLayerOnTop(
new DrawLooperLayerInfo()
- ..setOffset(150.0, 0.0)..setPaintBits(-1)..setColorMode(1),
+ ..setOffset(const Point(150.0, 0.0))
+ ..setColorMode(TransferMode.srcMode)
+ ..setPaintBits(-1),
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
- layerPaint.setColorFilter(new ColorFilter(0x770000ff, 5));
+ layerPaint.setColorFilter(
+ new ColorFilter(const Color.fromARGB(128, 0, 0, 255),
+ TransferMode.srcInMode));
})
..addLayerOnTop(
- new DrawLooperLayerInfo()..setOffset(75.0, 75.0)..setColorMode(1),
+ new DrawLooperLayerInfo()
+ ..setOffset(const Point(75.0, 75.0))
+ ..setColorMode(TransferMode.srcMode),
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 0, 0);
})
..addLayerOnTop(
- new DrawLooperLayerInfo()..setOffset(225.0, 75.0),
+ new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)),
(Paint layerPaint) {
// Since this layer uses a DST color mode, this has no effect.
layerPaint.color = const Color.fromARGB(128, 255, 0, 0);
« no previous file with comments | « sky/engine/core/painting/TransferMode.dart ('k') | sky/examples/raw/shadow.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698