Inheritance
System.Object
Rect
public class Rect : IEquatable<Rect>
Fields
Declaration
public const float _giantScalar = 1E+09F
Field Value
Type |
Description |
System.Single |
|
Declaration
public readonly float bottom
Field Value
Type |
Description |
System.Single |
|
Declaration
public static readonly Rect infinity
Field Value
Declaration
public static readonly Rect largest
Field Value
Declaration
public readonly float left
Field Value
Type |
Description |
System.Single |
|
Declaration
public static readonly Rect one
Field Value
Declaration
public readonly float right
Field Value
Type |
Description |
System.Single |
|
Declaration
public readonly float top
Field Value
Type |
Description |
System.Single |
|
Declaration
public static readonly Rect zero
Field Value
Properties
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
Type |
Description |
System.Single |
|
Declaration
public bool isEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public bool isFinite { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public bool isInfinite { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public float longestSide { get; }
Property Value
Type |
Description |
System.Single |
|
Declaration
public float shortestSide { get; }
Property Value
Type |
Description |
System.Single |
|
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
Type |
Description |
System.Single |
|
Methods
Declaration
public bool contains(Offset offset)
Parameters
Type |
Name |
Description |
Offset |
offset |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool contains(Rect rect)
Parameters
Type |
Name |
Description |
Rect |
rect |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool containsInclusive(Offset offset)
Parameters
Type |
Name |
Description |
Offset |
offset |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public Rect deflate(float delta)
Parameters
Type |
Name |
Description |
System.Single |
delta |
|
Returns
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Declaration
public bool Equals(Rect other)
Parameters
Type |
Name |
Description |
Rect |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public Rect expandToInclude(Rect other)
Parameters
Type |
Name |
Description |
Rect |
other |
|
Returns
Declaration
public static Rect fromCircle(Offset center, float radius)
Parameters
Type |
Name |
Description |
Offset |
center |
|
System.Single |
radius |
|
Returns
Declaration
public static Rect fromLTRB(float left, float top, float right, float bottom)
Parameters
Type |
Name |
Description |
System.Single |
left |
|
System.Single |
top |
|
System.Single |
right |
|
System.Single |
bottom |
|
Returns
Declaration
public static Rect fromLTWH(float left, float top, float width, float height)
Parameters
Type |
Name |
Description |
System.Single |
left |
|
System.Single |
top |
|
System.Single |
width |
|
System.Single |
height |
|
Returns
Declaration
public static Rect fromPoints(Offset a, Offset b)
Parameters
Returns
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public Rect inflate(float delta)
Parameters
Type |
Name |
Description |
System.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
Type |
Name |
Description |
Rect |
a |
|
Rect |
b |
|
System.Single |
t |
|
Returns
Declaration
Returns
Declaration
public Rect outset(float dx, float dy)
Parameters
Type |
Name |
Description |
System.Single |
dx |
|
System.Single |
dy |
|
Returns
Declaration
public bool overlaps(Rect other)
Parameters
Type |
Name |
Description |
Rect |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
Returns
Declaration
Returns
Declaration
Returns
Declaration
public Rect roundOut(float devicePixelRatio)
Parameters
Type |
Name |
Description |
System.Single |
devicePixelRatio |
|
Returns
Declaration
public Rect scale(float scaleX, float? scaleY = default(float? ))
Parameters
Type |
Name |
Description |
System.Single |
scaleX |
|
System.Nullable<System.Single> |
scaleY |
|
Returns
Declaration
public Rect shift(Offset offset)
Parameters
Type |
Name |
Description |
Offset |
offset |
|
Returns
Declaration
Returns
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Declaration
public Rect translate(float translateX, float translateY)
Parameters
Type |
Name |
Description |
System.Single |
translateX |
|
System.Single |
translateY |
|
Returns
Operators
Declaration
public static bool operator ==(Rect left, Rect right)
Parameters
Type |
Name |
Description |
Rect |
left |
|
Rect |
right |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool operator !=(Rect left, Rect right)
Parameters
Type |
Name |
Description |
Rect |
left |
|
Rect |
right |
|
Returns
Type |
Description |
System.Boolean |
|
Extension Methods