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

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

Issue 1206373002: Implement ClipRRect (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: cr feedback 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/rendering/box.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/basic.dart
diff --git a/sky/sdk/lib/widgets/basic.dart b/sky/sdk/lib/widgets/basic.dart
index 511bd4b81ac545e47eb695fc54ba0ce47f9dd6c4..3959af38bdbeab3f6940257892229eb6750a25cd 100644
--- a/sky/sdk/lib/widgets/basic.dart
+++ b/sky/sdk/lib/widgets/basic.dart
@@ -104,6 +104,24 @@ class ClipRect extends OneChildRenderObjectWrapper {
RenderClipRect get root => super.root;
RenderClipRect createNode() => new RenderClipRect();
+
+ // Nothing to sync, so we don't implement syncRenderObject()
+}
+
+class ClipRRect extends OneChildRenderObjectWrapper {
+ final double xRadius;
+ final double yRadius;
+ ClipRRect({ String key, Widget child, this.xRadius, this.yRadius })
+ : super(key: key, child: child);
+
+ RenderClipRRect get root => super.root;
+ RenderClipRRect createNode() => new RenderClipRRect(xRadius: xRadius, yRadius: yRadius);
+
+ void syncRenderObject(ClipRRect old) {
+ super.syncRenderObject(old);
+ root.xRadius = xRadius;
+ root.yRadius = yRadius;
+ }
}
class ClipOval extends OneChildRenderObjectWrapper {
@@ -112,8 +130,9 @@ class ClipOval extends OneChildRenderObjectWrapper {
RenderClipOval get root => super.root;
RenderClipOval createNode() => new RenderClipOval();
-}
+ // Nothing to sync, so we don't implement syncRenderObject()
+}
// POSITIONING AND SIZING NODES
@@ -157,6 +176,8 @@ class Center extends OneChildRenderObjectWrapper {
RenderPositionedBox get root => super.root;
RenderPositionedBox createNode() => new RenderPositionedBox();
+
+ // Nothing to sync, so we don't implement syncRenderObject()
}
class SizedBox extends OneChildRenderObjectWrapper {
« no previous file with comments | « sky/sdk/lib/rendering/box.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698