Rect
2020-02-06 本文已影响0人
翱翔的土豆
Rect
Rect.fromLTRB(this.left, this.top, this.right, this.bottom)
Rect.fromLTWH(double left, double top, double width, double height)
Rect.fromCircle({ Offset center, double radius })
Rect.fromCenter({ Offset center, double width, double height })
Rect.fromPoints(Offset a, Offset b)
static Rect lerp(Rect a, Rect b, double t)
- left: double
- top: double
- right: double
- bottom: double
1.1 get
double get width
double get height
Size get size
bool get hasNaN
bool get isInfinite
bool get isFinite
bool get isEmpty
Rect shift(Offset offset)
Rect translate(double translateX, double translateY)
Rect inflate(double delta)
Rect deflate(double delta)
Rect intersect(Rect other)
Rect expandToInclude(Rect other)
bool overlaps(Rect other)
double get shortestSide
double get longestSide
Offset get topLeft
Offset get topCenter
Offset get topRight
Offset get centerLeft
Offset get center
Offset get centerRight
Offset get bottomLeft
Offset get bottomCenter
Offset get bottomRight
bool contains(Offset offset)
1.2 static const
static const Rect zero = Rect.fromLTRB(0.0, 0.0, 0.0, 0.0);
static const Rect largest = Rect.fromLTRB(-_giantScalar, -_giantScalar, _giantScalar, _giantScalar);