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

Unified Diff: sky/sdk/example/raw/spinning_square.dart

Issue 1233673003: Fix bugs found by Dart analyzer (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: typo Created 5 years, 5 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/sdk/example/raw/spinning_square.dart
diff --git a/sky/sdk/example/raw/spinning_square.dart b/sky/sdk/example/raw/spinning_square.dart
index c64d40e590670bdcaa9b657527959f97a4ad498e..bb461741b875f1a51278a9513ae6e6dc5a1c5dc7 100644
--- a/sky/sdk/example/raw/spinning_square.dart
+++ b/sky/sdk/example/raw/spinning_square.dart
@@ -13,7 +13,7 @@ void beginFrame(double timeStamp) {
timeBase = timeStamp;
double delta = timeStamp - timeBase;
PictureRecorder recorder = new PictureRecorder();
- Canvas canvas = new Canvas(recorder, new Size(view.width, view.height));
+ Canvas canvas = new Canvas(recorder, new Rect.fromLTWH(0.0, 0.0, view.width, view.height));
canvas.translate(view.width / 2.0, view.height / 2.0);
canvas.rotate(math.PI * delta / 1800);
canvas.drawRect(new Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),

Powered by Google App Engine
This is Rietveld 408576698