提交 10d24c37 编写于 作者: A Adam Barth

Merge pull request #2442 from abarth/from_radius

Add new Size.fromRadius()
......@@ -11,6 +11,7 @@ class Size extends OffsetBase {
Size.copy(Size source) : super(source.width, source.height);
const Size.fromWidth(double width) : super(width, double.INFINITY);
const Size.fromHeight(double height) : super(double.INFINITY, height);
const Size.fromRadius(double radius) : super(radius * 2.0, radius * 2.0);
double get width => _dx;
double get height => _dy;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册