blob: 7cbc6e005af2342108fdfe13f162ab97c104e16d [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of dart.ui;
/// A radius for either circular or elliptical shapes.
class Radius {
/// Constructs a circular radius. [x] and [y] will have the same radius value.
const Radius.circular(double radius) : this.elliptical(radius, radius);
/// Constructs an elliptical radius with the given radii.
const Radius.elliptical(this.x, this.y);
/// The radius value on the horizontal axis.
final double x;
/// The radius value on the vertical axis.
final double y;
/// A radius with [x] and [y] values set to zero.
///
/// You can use [Radius.zero] with [RRect] to have right-angle corners.
static const Radius zero = Radius.circular(0.0);
}