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

Unified Diff: charted/lib/svg/shapes/rect.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « charted/lib/svg/shapes/line.dart ('k') | charted/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: charted/lib/svg/shapes/rect.dart
diff --git a/charted/lib/svg/shapes/rect.dart b/charted/lib/svg/shapes/rect.dart
deleted file mode 100644
index 554efbf04266f79ffb53bdc29825ad6369be3280..0000000000000000000000000000000000000000
--- a/charted/lib/svg/shapes/rect.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// Copyright 2014 Google Inc. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file or at
-// https://developers.google.com/open-source/licenses/bsd
-//
-
-part of charted.svg.shapes;
-
-/// Draw a rectangle at [x], [y] which is [width] pixels wide and
-/// [height] pixels height. [topLeft], [topRight], [bottomRight] and
-/// [bottomLeft] are the corner radius at each of the four corners.
-String roundedRect(int x, int y, int width, int height,
- int topLeft, int topRight, int bottomRight, int bottomLeft) =>
- 'M${x+topLeft},${y} '
- 'L${x+width-topRight},${y} '
- 'Q${x+width},${y} ${x+width},${y+topRight}'
- 'L${x+width},${y+height-bottomRight} '
- 'Q${x+width},${y+height} ${x+width-bottomRight},${y+height}'
- 'L${x+bottomLeft},${y+height} '
- 'Q${x},${y+height} ${x},${y+height-bottomLeft}'
- 'L${x},${y+topLeft} '
- 'Q${x},${y} ${x+topLeft},${y} Z';
-
-/// Draw a rectangle with rounded corners on both corners on the right.
-String rightRoundedRect(int x, int y, int width, int height, int radius) {
- if (width < radius) radius = width;
- if (height < radius * 2) radius = height ~/ 2;
- return roundedRect(x, y, width, height, 0, radius, radius, 0);
-}
-
-/// Draw a rectangle with rounded corners on both corners on the top.
-String topRoundedRect(int x, int y, int width, int height, int radius) {
- if (height < radius) radius = height;
- if (width < radius * 2) radius = width ~/ 2;
- return roundedRect(x, y, width, height, radius, radius, 0, 0);
-}
-
-/// Draw a rectangle with rounded corners on both corners on the right.
-String leftRoundedRect(int x, int y, int width, int height, int radius) {
- if (width < radius) radius = width;
- if (height < radius * 2) radius = height ~/ 2;
- return roundedRect(x, y, width, height, radius, 0, 0, radius);
-}
-
-/// Draw a rectangle with rounded corners on both corners on the top.
-String bottomRoundedRect(int x, int y, int width, int height, int radius) {
- if (height < radius) radius = height;
- if (width < radius * 2) radius = width ~/ 2;
- return roundedRect(x, y, width, height, 0, 0, radius, radius);
-}
« no previous file with comments | « charted/lib/svg/shapes/line.dart ('k') | charted/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698