public class Rect : IEquatable<Rect>
Fields
Declaration
public const float _giantScalar = 1E+09F
Field Value
Declaration
public readonly float bottom
Field Value
Declaration
public static readonly Rect infinity
Field Value
Declaration
public static readonly Rect largest
Field Value
Declaration
public readonly float left
Field Value
Declaration
public static readonly Rect one
Field Value
Declaration
public readonly float right
Field Value
Declaration
public readonly float top
Field Value
Declaration
public static readonly Rect zero
Field Value
Properties
Declaration
public float area { get; }
Property Value
Declaration
public Offset bottomCenter { get; }
Property Value
Declaration
public Offset bottomLeft { get; }
Property Value
Declaration
public Offset bottomRight { get; }
Property Value
Declaration
public Offset center { get; }
Property Value
Declaration
public Offset centerLeft { get; }
Property Value
Declaration
public Offset centerRight { get; }
Property Value
Declaration
public float height { get; }
Property Value
Declaration
public bool isEmpty { get; }
Property Value
Declaration
public bool isFinite { get; }
Property Value
Declaration
public bool isInfinite { get; }
Property Value
Declaration
public float longestSide { get; }
Property Value
Declaration
public float margin { get; }
Property Value
Declaration
public float shortestSide { get; }
Property Value
Declaration
public Size size { get; }
Property Value
Declaration
public Offset topCenter { get; }
Property Value
Declaration
public Offset topLeft { get; }
Property Value
Declaration
public Offset topRight { get; }
Property Value
Declaration
public float width { get; }
Property Value
Methods
Declaration
public bool contains(Offset offset)
Parameters
| Type |
Name |
Description |
| Offset |
offset |
|
Returns
Declaration
public bool contains(Rect rect)
Parameters
| Type |
Name |
Description |
| Rect |
rect |
|
Returns
Declaration
public bool containsInclusive(Offset offset)
Parameters
| Type |
Name |
Description |
| Offset |
offset |
|
Returns
Declaration
public Rect deflate(float delta)
Parameters
| Type |
Name |
Description |
| Single |
delta |
|
Returns
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| Object |
obj |
|
Returns
Overrides
Declaration
public bool Equals(Rect other)
Parameters
| Type |
Name |
Description |
| Rect |
other |
|
Returns
Declaration
public Rect expandToInclude(Rect other)
Parameters
| Type |
Name |
Description |
| Rect |
other |
|
Returns
Declaration
public static Rect fromCircle(Offset center, float radius)
Parameters
Returns
Declaration
public static Rect fromLTRB(float left, float top, float right, float bottom)
Parameters
Returns
Declaration
public static Rect fromLTWH(float left, float top, float width, float height)
Parameters
Returns
Declaration
public static Rect fromPoints(Offset a, Offset b)
Parameters
Returns
Declaration
public override int GetHashCode()
Returns
Overrides
Declaration
public Rect inflate(float delta)
Parameters
| Type |
Name |
Description |
| Single |
delta |
|
Returns
Declaration
public Rect intersect(Rect other)
Parameters
| Type |
Name |
Description |
| Rect |
other |
|
Returns
Declaration
public static Rect lerp(Rect a, Rect b, float t)
Parameters
Returns
Declaration
Returns
Declaration
public Rect outset(float dx, float dy)
Parameters
Returns
Declaration
public bool overlaps(Rect other)
Parameters
| Type |
Name |
Description |
| Rect |
other |
|
Returns
Declaration
Returns
Declaration
Returns
Declaration
Returns
Declaration
public Rect roundOutScale(float scale)
Parameters
| Type |
Name |
Description |
| Single |
scale |
|
Returns
Declaration
public Rect scale(float scaleX, float? scaleY = default(float? ))
Parameters
Returns
Declaration
public Rect shift(Offset offset)
Parameters
| Type |
Name |
Description |
| Offset |
offset |
|
Returns
Declaration
Returns
Declaration
public override string ToString()
Returns
Overrides
Declaration
public Rect translate(float translateX, float translateY)
Parameters
Returns
Declaration
public Rect withDevicePixelRatio(float devicePixelRatio)
Parameters
| Type |
Name |
Description |
| Single |
devicePixelRatio |
|
Returns
Operators
Declaration
public static bool operator ==(Rect left, Rect right)
Parameters
| Type |
Name |
Description |
| Rect |
left |
|
| Rect |
right |
|
Returns
Declaration
public static bool operator !=(Rect left, Rect right)
Parameters
| Type |
Name |
Description |
| Rect |
left |
|
| Rect |
right |
|
Returns
Extension Methods