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

Unified Diff: sky/engine/core/painting/Rect.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/engine/core/painting/Rect.dart
diff --git a/sky/engine/core/painting/Rect.dart b/sky/engine/core/painting/Rect.dart
index 0fc67baf296e63fb969d6af75e8679217315da21..75dd303996ce93bd7e78fafe0468be708263e2c4 100644
--- a/sky/engine/core/painting/Rect.dart
+++ b/sky/engine/core/painting/Rect.dart
@@ -16,6 +16,14 @@ class Rect {
..[3] = bottom;
}
+ Rect.fromLTWH(double left, double top, double width, double height) {
+ _value
+ ..[0] = left
+ ..[1] = top
+ ..[2] = left + width
+ ..[3] = top + height;
+ }
+
Rect.fromPointAndSize(Point point, Size size) {
_value
..[0] = point.x

Powered by Google App Engine
This is Rietveld 408576698