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

Unified Diff: sky/sdk/lib/widgets/ink_well.dart

Issue 1209413004: Instead of applying a transform for every RenderObject, pass down an Offset for where to paint. (Closed) Base URL: https://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/sdk/lib/widgets/ink_well.dart
diff --git a/sky/sdk/lib/widgets/ink_well.dart b/sky/sdk/lib/widgets/ink_well.dart
index 0c13f5ce499790a026c27de20285b8124cb30e36..0e8a69058d8a67c2cb5aee837836db1d500ce7cf 100644
--- a/sky/sdk/lib/widgets/ink_well.dart
+++ b/sky/sdk/lib/widgets/ink_well.dart
@@ -88,15 +88,16 @@ class RenderInkWell extends RenderProxyBox {
markNeedsPaint();
}
- void paint(RenderCanvas canvas) {
+ void paint(RenderCanvas canvas, Offset offset) {
if (!_splashes.isEmpty) {
canvas.save();
+ canvas.translate(offset.dx, offset.dy);
canvas.clipRect(new Rect.fromSize(size));
for (InkSplash splash in _splashes)
splash.paint(canvas);
canvas.restore();
}
- super.paint(canvas);
+ super.paint(canvas, offset);
}
}

Powered by Google App Engine
This is Rietveld 408576698