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

Unified Diff: sky/sdk/lib/painting/box_painter.dart

Issue 1214833004: Split Size into Size and Offset. (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
« no previous file with comments | « sky/sdk/lib/example/widgets/sector.dart ('k') | sky/sdk/lib/painting/shadows.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/painting/box_painter.dart
diff --git a/sky/sdk/lib/painting/box_painter.dart b/sky/sdk/lib/painting/box_painter.dart
index 8348fc04fa947937e9700be1d9200c1d6c8e122b..b89b0f8abfd316c7723c34dd7e7e44bcb3087ec8 100644
--- a/sky/sdk/lib/painting/box_painter.dart
+++ b/sky/sdk/lib/painting/box_painter.dart
@@ -4,7 +4,7 @@
import 'dart:math' as math;
import 'dart:sky' as sky;
-import 'dart:sky' show Point, Size, Rect, Color, Paint, Path;
+import 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
import 'shadows.dart';
@@ -65,7 +65,7 @@ class BoxShadow {
});
final Color color;
- final Size offset;
+ final Offset offset;
final double blur;
String toString() => 'BoxShadow($color, $offset, $blur)';
@@ -209,7 +209,7 @@ class BoxPainter {
Point center = rect.center;
Size size = rect.size;
double radius = math.min(size.width, size.height) / 2.0;
- canvas.drawCircle(center.x, center.y, radius, _backgroundPaint);
+ canvas.drawCircle(center, radius, _backgroundPaint);
break;
case Shape.rectangle:
if (_decoration.borderRadius == null)
« no previous file with comments | « sky/sdk/lib/example/widgets/sector.dart ('k') | sky/sdk/lib/painting/shadows.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698