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

Unified Diff: sky/sdk/lib/example/raw/shadow.dart

Issue 1210173004: Move examples to //sky/sdk/example (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/sdk/lib/example/raw/pubspec.yaml ('k') | sky/sdk/lib/example/raw/spinning_arabic.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/example/raw/shadow.dart
diff --git a/sky/sdk/lib/example/raw/shadow.dart b/sky/sdk/lib/example/raw/shadow.dart
deleted file mode 100644
index defcb2a60c0bf409b050e247b43c3448832f9ace..0000000000000000000000000000000000000000
--- a/sky/sdk/lib/example/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) {
- double size = 100.0;
- PictureRecorder recorder = new PictureRecorder();
- Canvas canvas = new Canvas(recorder, new Size(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 Offset(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();
-}
« no previous file with comments | « sky/sdk/lib/example/raw/pubspec.yaml ('k') | sky/sdk/lib/example/raw/spinning_arabic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698