Rect

作者: 翱翔的土豆 | 来源:发表于2020-02-06 15:49 被阅读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);

相关文章

网友评论

      本文标题:Rect

      本文链接:https://www.haomeiwen.com/subject/yjoexhtx.html