Index: sky/examples/raw/shadow.dart |
diff --git a/sky/examples/raw/shadow.dart b/sky/examples/raw/shadow.dart |
index 0b61437fffa862b20a8bb358107d712a0e046cb5..a127cfb2a2bd36c8008d40780051abf209c7a868 100644 |
--- a/sky/examples/raw/shadow.dart |
+++ b/sky/examples/raw/shadow.dart |
@@ -10,22 +10,25 @@ void beginFrame(double timeStamp) { |
canvas.translate(size + 10.0, size + 10.0); |
Paint paint = new Paint(); |
- paint.setARGB(255, 0, 255, 0); |
+ paint.color = const Color.fromARGB(255, 0, 255, 0); |
var builder = new LayerDrawLooperBuilder() |
// Shadow layer. |
..addLayerOnTop( |
new DrawLooperLayerInfo() |
+ ..setPaintBits(-1) |
eseidel
2015/06/02 20:49:45
What does this do?
Matt Perry
2015/06/02 21:03:42
It tells the DrawLooper to use layerPaint's versio
|
..setOffset(const Point(5.0, 5.0)) |
..setColorMode(TransferMode.srcInMode), |
(Paint layerPaint) { |
- layerPaint.setARGB(128, 55, 55, 55); |
- // TODO(mpcomplete): add blur filter |
+ layerPaint.color = const Color.fromARGB(128, 55, 55, 55); |
+ layerPaint.setMaskFilter( |
+ new MaskFilter.Blur(BlurStyle.normal, 5.0, highQuality: true)); |
}) |
// Main layer. |
..addLayerOnTop(new DrawLooperLayerInfo(), (Paint) {}); |
paint.setDrawLooper(builder.build()); |
- canvas.drawPaint(new Paint()..setARGB(255, 255, 255, 255)); |
+ canvas.drawPaint( |
+ new Paint()..color = const Color.fromARGB(255, 255, 255, 255)); |
canvas.drawRect(new Rect.fromLTRB(-size, -size, size, size), paint); |
view.picture = canvas.endRecording(); |
} |