Class Rect | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Rect

    Inheritance
    System.Object
    Rect
    Namespace: Unity.UIWidgets.ui
    Syntax
    public class Rect : IEquatable<Rect>

    Fields

    _giantScalar

    Declaration
    public const float _giantScalar = 1E+09F
    Field Value
    Type Description
    System.Single

    bottom

    Declaration
    public readonly float bottom
    Field Value
    Type Description
    System.Single

    infinity

    Declaration
    public static readonly Rect infinity
    Field Value
    Type Description
    Rect

    largest

    Declaration
    public static readonly Rect largest
    Field Value
    Type Description
    Rect

    left

    Declaration
    public readonly float left
    Field Value
    Type Description
    System.Single

    one

    Declaration
    public static readonly Rect one
    Field Value
    Type Description
    Rect

    right

    Declaration
    public readonly float right
    Field Value
    Type Description
    System.Single

    top

    Declaration
    public readonly float top
    Field Value
    Type Description
    System.Single

    zero

    Declaration
    public static readonly Rect zero
    Field Value
    Type Description
    Rect

    Properties

    bottomCenter

    Declaration
    public Offset bottomCenter { get; }
    Property Value
    Type Description
    Offset

    bottomLeft

    Declaration
    public Offset bottomLeft { get; }
    Property Value
    Type Description
    Offset

    bottomRight

    Declaration
    public Offset bottomRight { get; }
    Property Value
    Type Description
    Offset

    center

    Declaration
    public Offset center { get; }
    Property Value
    Type Description
    Offset

    centerLeft

    Declaration
    public Offset centerLeft { get; }
    Property Value
    Type Description
    Offset

    centerRight

    Declaration
    public Offset centerRight { get; }
    Property Value
    Type Description
    Offset

    height

    Declaration
    public float height { get; }
    Property Value
    Type Description
    System.Single

    isEmpty

    Declaration
    public bool isEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    isFinite

    Declaration
    public bool isFinite { get; }
    Property Value
    Type Description
    System.Boolean

    isInfinite

    Declaration
    public bool isInfinite { get; }
    Property Value
    Type Description
    System.Boolean

    longestSide

    Declaration
    public float longestSide { get; }
    Property Value
    Type Description
    System.Single

    shortestSide

    Declaration
    public float shortestSide { get; }
    Property Value
    Type Description
    System.Single

    size

    Declaration
    public Size size { get; }
    Property Value
    Type Description
    Size

    topCenter

    Declaration
    public Offset topCenter { get; }
    Property Value
    Type Description
    Offset

    topLeft

    Declaration
    public Offset topLeft { get; }
    Property Value
    Type Description
    Offset

    topRight

    Declaration
    public Offset topRight { get; }
    Property Value
    Type Description
    Offset

    width

    Declaration
    public float width { get; }
    Property Value
    Type Description
    System.Single

    Methods

    contains(Offset)

    Declaration
    public bool contains(Offset offset)
    Parameters
    Type Name Description
    Offset offset
    Returns
    Type Description
    System.Boolean

    contains(Rect)

    Declaration
    public bool contains(Rect rect)
    Parameters
    Type Name Description
    Rect rect
    Returns
    Type Description
    System.Boolean

    containsInclusive(Offset)

    Declaration
    public bool containsInclusive(Offset offset)
    Parameters
    Type Name Description
    Offset offset
    Returns
    Type Description
    System.Boolean

    deflate(Single)

    Declaration
    public Rect deflate(float delta)
    Parameters
    Type Name Description
    System.Single delta
    Returns
    Type Description
    Rect

    Equals(Object)

    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)

    Equals(Rect)

    Declaration
    public bool Equals(Rect other)
    Parameters
    Type Name Description
    Rect other
    Returns
    Type Description
    System.Boolean

    expandToInclude(Rect)

    Declaration
    public Rect expandToInclude(Rect other)
    Parameters
    Type Name Description
    Rect other
    Returns
    Type Description
    Rect

    fromCircle(Offset, Single)

    Declaration
    public static Rect fromCircle(Offset center, float radius)
    Parameters
    Type Name Description
    Offset center
    System.Single radius
    Returns
    Type Description
    Rect

    fromLTRB(Single, Single, Single, Single)

    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
    Type Description
    Rect

    fromLTWH(Single, Single, Single, Single)

    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
    Type Description
    Rect

    fromPoints(Offset, Offset)

    Declaration
    public static Rect fromPoints(Offset a, Offset b)
    Parameters
    Type Name Description
    Offset a
    Offset b
    Returns
    Type Description
    Rect

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    inflate(Single)

    Declaration
    public Rect inflate(float delta)
    Parameters
    Type Name Description
    System.Single delta
    Returns
    Type Description
    Rect

    intersect(Rect)

    Declaration
    public Rect intersect(Rect other)
    Parameters
    Type Name Description
    Rect other
    Returns
    Type Description
    Rect

    lerp(Rect, Rect, Single)

    Declaration
    public static Rect lerp(Rect a, Rect b, float t)
    Parameters
    Type Name Description
    Rect a
    Rect b
    System.Single t
    Returns
    Type Description
    Rect

    normalize()

    Declaration
    public Rect normalize()
    Returns
    Type Description
    Rect

    outset(Single, Single)

    Declaration
    public Rect outset(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx
    System.Single dy
    Returns
    Type Description
    Rect

    overlaps(Rect)

    Declaration
    public bool overlaps(Rect other)
    Parameters
    Type Name Description
    Rect other
    Returns
    Type Description
    System.Boolean

    round()

    Declaration
    public Rect round()
    Returns
    Type Description
    Rect

    roundIn()

    Declaration
    public Rect roundIn()
    Returns
    Type Description
    Rect

    roundOut()

    Declaration
    public Rect roundOut()
    Returns
    Type Description
    Rect

    roundOut(Single)

    Declaration
    public Rect roundOut(float devicePixelRatio)
    Parameters
    Type Name Description
    System.Single devicePixelRatio
    Returns
    Type Description
    Rect

    scale(Single, Nullable<Single>)

    Declaration
    public Rect scale(float scaleX, float? scaleY = default(float? ))
    Parameters
    Type Name Description
    System.Single scaleX
    System.Nullable<System.Single> scaleY
    Returns
    Type Description
    Rect

    shift(Offset)

    Declaration
    public Rect shift(Offset offset)
    Parameters
    Type Name Description
    Offset offset
    Returns
    Type Description
    Rect

    toQuad()

    Declaration
    public Offset[] toQuad()
    Returns
    Type Description
    Offset[]

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    translate(Single, Single)

    Declaration
    public Rect translate(float translateX, float translateY)
    Parameters
    Type Name Description
    System.Single translateX
    System.Single translateY
    Returns
    Type Description
    Rect

    Operators

    Equality(Rect, Rect)

    Declaration
    public static bool operator ==(Rect left, Rect right)
    Parameters
    Type Name Description
    Rect left
    Rect right
    Returns
    Type Description
    System.Boolean

    Inequality(Rect, Rect)

    Declaration
    public static bool operator !=(Rect left, Rect right)
    Parameters
    Type Name Description
    Rect left
    Rect right
    Returns
    Type Description
    System.Boolean

    Extension Methods

    Conversions.toRect(Rect)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023