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

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

Issue 1214833004: Split Size into Size and Offset. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add the new files also 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
index 6811987d49854f80b7261bcaac7b78d74d28d3d7..defcb2a60c0bf409b050e247b43c3448832f9ace 100644
--- a/sky/examples/raw/shadow.dart
+++ b/sky/examples/raw/shadow.dart
@@ -5,9 +5,9 @@
import 'dart:sky';
void beginFrame(double timeStamp) {
- var size = 100.0;
+ double size = 100.0;
PictureRecorder recorder = new PictureRecorder();
- Canvas canvas = new Canvas(recorder, view.width, view.height);
+ Canvas canvas = new Canvas(recorder, new Size(view.width, view.height));
canvas.translate(size + 10.0, size + 10.0);
Paint paint = new Paint();
@@ -17,7 +17,7 @@ void beginFrame(double timeStamp) {
..addLayerOnTop(
new DrawLooperLayerInfo()
..setPaintBits(PaintBits.all)
- ..setOffset(const Point(5.0, 5.0))
+ ..setOffset(const Offset(5.0, 5.0))
..setColorMode(TransferMode.src),
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 55, 55, 55);

Powered by Google App Engine
This is Rietveld 408576698