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

Unified Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1174203002: Clip inkwell splash around the floating action button (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase and apply code review 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/framework/fn2.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/framework/rendering/box.dart
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart
index 53021807e804c5eb4ebaef53ee673336ccfeb4f7..6b5d0f0d419cbbfa67b664f69779734f7f36c86f 100644
--- a/sky/sdk/lib/framework/rendering/box.dart
+++ b/sky/sdk/lib/framework/rendering/box.dart
@@ -439,8 +439,8 @@ class RenderShrinkWrapWidth extends RenderProxyBox {
}
}
-class RenderClip extends RenderProxyBox {
- RenderClip({ RenderBox child }) : super(child);
+class RenderClipRect extends RenderProxyBox {
+ RenderClipRect({ RenderBox child }) : super(child);
void paint(RenderObjectDisplayList canvas) {
if (child != null) {
@@ -452,6 +452,22 @@ class RenderClip extends RenderProxyBox {
}
}
+class RenderClipOval extends RenderProxyBox {
+ RenderClipOval({ RenderBox child }) : super(child);
+
+ void paint(RenderObjectDisplayList canvas) {
+ if (child != null) {
+ Rect rect = new Rect.fromSize(size);
+ canvas.saveLayer(rect, new Paint());
+ Path path = new Path();
+ path.addOval(rect);
+ canvas.clipPath(path);
+ child.paint(canvas);
+ canvas.restore();
+ }
+ }
+}
+
class RenderPadding extends RenderBox with RenderObjectWithChildMixin<RenderBox> {
RenderPadding({ EdgeDims padding, RenderBox child }) {
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698