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

    Class BoxConstraints

    Inheritance
    System.Object
    Constraints
    BoxConstraints
    Namespace: Unity.UIWidgets.rendering
    Syntax
    public class BoxConstraints : Constraints, IEquatable<BoxConstraints>

    Constructors

    BoxConstraints(Single, Single, Single, Single)

    Declaration
    public BoxConstraints(float minWidth = 0F, float maxWidth = InfinityF, float minHeight = 0F, float maxHeight = InfinityF)
    Parameters
    Type Name Description
    System.Single minWidth
    System.Single maxWidth
    System.Single minHeight
    System.Single maxHeight

    Fields

    maxHeight

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

    maxWidth

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

    minHeight

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

    minWidth

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

    Properties

    biggest

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

    flipped

    Declaration
    public BoxConstraints flipped { get; }
    Property Value
    Type Description
    BoxConstraints

    hasBoundedHeight

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

    hasBoundedWidth

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

    hasInfiniteHeight

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

    hasInfiniteWidth

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

    hasTightHeight

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

    hasTightWidth

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

    isNormalized

    Declaration
    public override bool isNormalized { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Constraints.isNormalized

    isTight

    Declaration
    public override bool isTight { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Constraints.isTight

    smallest

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

    Methods

    constrain(Size)

    Declaration
    public Size constrain(Size size)
    Parameters
    Type Name Description
    Size size
    Returns
    Type Description
    Size

    constrainDimensions(Single, Single)

    Declaration
    public Size constrainDimensions(float width, float height)
    Parameters
    Type Name Description
    System.Single width
    System.Single height
    Returns
    Type Description
    Size

    constrainHeight(Single)

    Declaration
    public float constrainHeight(float height = InfinityF)
    Parameters
    Type Name Description
    System.Single height
    Returns
    Type Description
    System.Single

    constrainSizeAndAttemptToPreserveAspectRatio(Size)

    Declaration
    public Size constrainSizeAndAttemptToPreserveAspectRatio(Size size)
    Parameters
    Type Name Description
    Size size
    Returns
    Type Description
    Size

    constrainWidth(Single)

    Declaration
    public float constrainWidth(float width = InfinityF)
    Parameters
    Type Name Description
    System.Single width
    Returns
    Type Description
    System.Single

    copyWith(Nullable<Single>, Nullable<Single>, Nullable<Single>, Nullable<Single>)

    Declaration
    public BoxConstraints copyWith(float? minWidth = default(float? ), float? maxWidth = default(float? ), float? minHeight = default(float? ), float? maxHeight = default(float? ))
    Parameters
    Type Name Description
    System.Nullable<System.Single> minWidth
    System.Nullable<System.Single> maxWidth
    System.Nullable<System.Single> minHeight
    System.Nullable<System.Single> maxHeight
    Returns
    Type Description
    BoxConstraints

    debugAssertIsValid(Boolean, InformationCollector)

    Declaration
    public override bool debugAssertIsValid(bool isAppliedConstraint = false, InformationCollector informationCollector = null)
    Parameters
    Type Name Description
    System.Boolean isAppliedConstraint
    InformationCollector informationCollector
    Returns
    Type Description
    System.Boolean
    Overrides
    Constraints.debugAssertIsValid(Boolean, InformationCollector)

    deflate(EdgeInsets)

    Declaration
    public BoxConstraints deflate(EdgeInsets edges)
    Parameters
    Type Name Description
    EdgeInsets edges
    Returns
    Type Description
    BoxConstraints

    enforce(BoxConstraints)

    Declaration
    public BoxConstraints enforce(BoxConstraints constraints)
    Parameters
    Type Name Description
    BoxConstraints constraints
    Returns
    Type Description
    BoxConstraints

    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(BoxConstraints)

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

    expand(Nullable<Single>, Nullable<Single>)

    Declaration
    public static BoxConstraints expand(float? width = default(float? ), float? height = default(float? ))
    Parameters
    Type Name Description
    System.Nullable<System.Single> width
    System.Nullable<System.Single> height
    Returns
    Type Description
    BoxConstraints

    GetHashCode()

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

    heightConstraints()

    Declaration
    public BoxConstraints heightConstraints()
    Returns
    Type Description
    BoxConstraints

    isSatisfiedBy(Size)

    Declaration
    public bool isSatisfiedBy(Size size)
    Parameters
    Type Name Description
    Size size
    Returns
    Type Description
    System.Boolean

    lerp(BoxConstraints, BoxConstraints, Single)

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

    loose(Size)

    Declaration
    public static BoxConstraints loose(Size size)
    Parameters
    Type Name Description
    Size size
    Returns
    Type Description
    BoxConstraints

    loosen()

    Declaration
    public BoxConstraints loosen()
    Returns
    Type Description
    BoxConstraints

    normalize()

    Declaration
    public BoxConstraints normalize()
    Returns
    Type Description
    BoxConstraints

    tight(Size)

    Declaration
    public static BoxConstraints tight(Size size)
    Parameters
    Type Name Description
    Size size
    Returns
    Type Description
    BoxConstraints

    tighten(Nullable<Single>, Nullable<Single>)

    Declaration
    public BoxConstraints tighten(float? width = default(float? ), float? height = default(float? ))
    Parameters
    Type Name Description
    System.Nullable<System.Single> width
    System.Nullable<System.Single> height
    Returns
    Type Description
    BoxConstraints

    tightFor(Nullable<Single>, Nullable<Single>)

    Declaration
    public static BoxConstraints tightFor(float? width = default(float? ), float? height = default(float? ))
    Parameters
    Type Name Description
    System.Nullable<System.Single> width
    System.Nullable<System.Single> height
    Returns
    Type Description
    BoxConstraints

    tightForFinite(Single, Single)

    Declaration
    public static BoxConstraints tightForFinite(float width = InfinityF, float height = InfinityF)
    Parameters
    Type Name Description
    System.Single width
    System.Single height
    Returns
    Type Description
    BoxConstraints

    ToString()

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

    widthConstraints()

    Declaration
    public BoxConstraints widthConstraints()
    Returns
    Type Description
    BoxConstraints

    Operators

    Division(BoxConstraints, Single)

    Declaration
    public static BoxConstraints operator /(BoxConstraints it, float factor)
    Parameters
    Type Name Description
    BoxConstraints it
    System.Single factor
    Returns
    Type Description
    BoxConstraints

    Equality(BoxConstraints, BoxConstraints)

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

    Inequality(BoxConstraints, BoxConstraints)

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

    Modulus(BoxConstraints, Single)

    Declaration
    public static BoxConstraints operator %(BoxConstraints it, float value)
    Parameters
    Type Name Description
    BoxConstraints it
    System.Single value
    Returns
    Type Description
    BoxConstraints

    Multiply(BoxConstraints, Single)

    Declaration
    public static BoxConstraints operator *(BoxConstraints it, float factor)
    Parameters
    Type Name Description
    BoxConstraints it
    System.Single factor
    Returns
    Type Description
    BoxConstraints
    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