AngeliA
Search Results for

    Show / Hide Table of Contents

    Struct IRect

    rectangle with intager data

    Implements
    IEquatable<IRect>
    IFormattable

    Constructors

    IRect(IRect)

    Declaration
    public IRect(IRect source)

    IRect(Int2, Int2)

    Declaration
    public IRect(Int2 position, Int2 size)

    IRect(int, int, int, int)

    Declaration
    public IRect(int xMin, int yMin, int width, int height)

    Fields

    height

    Vertical size

    Declaration
    public int height

    width

    Horizontal size

    Declaration
    public int width

    x

    Left position

    Declaration
    public int x

    y

    Bottom position

    Declaration
    public int y

    Properties

    center

    Declaration
    public readonly Float2 center { get; }

    max

    Declaration
    public Int2 max { readonly get; set; }

    min

    Declaration
    public Int2 min { readonly get; set; }

    position

    Always return (x, y) no matter size is positive of negative

    Declaration
    public Int2 position { readonly get; set; }

    size

    (width, height)

    Declaration
    public Int2 size { readonly get; set; }

    xMax

    Declaration
    public int xMax { readonly get; set; }

    xMin

    Declaration
    public int xMin { readonly get; set; }

    yMax

    Declaration
    public int yMax { readonly get; set; }

    yMin

    Declaration
    public int yMin { readonly get; set; }

    Methods

    Contains(Int2)

    True if the given position is inside this rectangle

    Declaration
    public readonly bool Contains(Int2 position)

    Equals(IRect)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public readonly bool Equals(IRect other)
    Parameters
    Type Name Description
    IRect other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override readonly bool Equals(object other)
    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()

    MinMaxRect(Int2, Int2)

    Create a rectangle with given min and max positions

    Declaration
    public static IRect MinMaxRect(Int2 min, Int2 max)

    MinMaxRect(int, int, int, int)

    Create a rectangle with given min and max positions

    Declaration
    public static IRect MinMaxRect(int minX, int minY, int maxX, int maxY)

    Overlaps(IRect)

    True if the given rectangle overlap with current one

    Declaration
    public readonly bool Overlaps(IRect other)

    Point(Int2)

    Create a rectangle with 1 in width and height

    Declaration
    public static IRect Point(Int2 pos)

    Point(int, int)

    Create a rectangle with 1 in width and height

    Declaration
    public static IRect Point(int x, int y)

    SetMinMax(Int2, Int2)

    Set value of this rectangle with min and max position

    Declaration
    public void SetMinMax(Int2 minPosition, Int2 maxPosition)

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    ValueType.ToString()

    ToString(string)

    Declaration
    public readonly string ToString(string format)

    ToString(string, IFormatProvider)

    Formats the value of the current instance using the specified format.

    Declaration
    public readonly string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    string format

    The format to use.

    -or-

    A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

    IFormatProvider formatProvider

    The provider to use to format the value.

    -or-

    A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

    Returns
    Type Description
    string

    The value of the current instance in the specified format.

    Operators

    operator ==(IRect, IRect)

    Declaration
    public static bool operator ==(IRect lhs, IRect rhs)

    operator !=(IRect, IRect)

    Declaration
    public static bool operator !=(IRect lhs, IRect rhs)
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค