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

Unified Diff: sky/examples/raw/shadow.dart

Issue 1218593002: Move sky/examples to sky/sdk/lib/example, and code changes to support that change. Fixes T277. (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
Index: sky/examples/raw/shadow.dart
diff --git a/sky/examples/raw/shadow.dart b/sky/examples/raw/shadow.dart
deleted file mode 100644
index 6811987d49854f80b7261bcaac7b78d74d28d3d7..0000000000000000000000000000000000000000
--- a/sky/examples/raw/shadow.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:sky';
-
-void beginFrame(double timeStamp) {
- var size = 100.0;
- PictureRecorder recorder = new PictureRecorder();
- Canvas canvas = new Canvas(recorder, view.width, view.height);
- canvas.translate(size + 10.0, size + 10.0);
-
- Paint paint = new Paint();
- paint.color = const Color.fromARGB(255, 0, 255, 0);
- var builder = new LayerDrawLooperBuilder()
- // Shadow layer.
- ..addLayerOnTop(
- new DrawLooperLayerInfo()
- ..setPaintBits(PaintBits.all)
- ..setOffset(const Point(5.0, 5.0))
- ..setColorMode(TransferMode.src),
- (Paint layerPaint) {
- 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()..color = const Color.fromARGB(255, 255, 255, 255));
- canvas.drawRect(new Rect.fromLTRB(-size, -size, size, size), paint);
- view.picture = recorder.endRecording();
-}
-
-void main() {
- view.setBeginFrameCallback(beginFrame);
- view.scheduleFrame();
-}

Powered by Google App Engine
This is Rietveld 408576698