Struct Rectangle
- Namespace
- NeoVeldrid
- Assembly
- NeoVeldrid.dll
public struct Rectangle : IEquatable<Rectangle>
- Implements
- Inherited Members
Constructors
Rectangle(Point, Point)
public Rectangle(Point topLeft, Point size)
Parameters
Rectangle(int, int, int, int)
public Rectangle(int x, int y, int width, int height)
Parameters
Fields
Height
public int Height
Field Value
Width
public int Width
Field Value
X
public int X
Field Value
Y
public int Y
Field Value
Properties
Bottom
public readonly int Bottom { get; }
Property Value
Left
public readonly int Left { get; }
Property Value
Position
public readonly Vector2 Position { get; }
Property Value
Right
public readonly int Right { get; }
Property Value
Size
public readonly Vector2 Size { get; }
Property Value
Top
public readonly int Top { get; }
Property Value
Methods
Contains(Point)
public readonly bool Contains(Point p)
Parameters
pPoint
Returns
Contains(int, int)
public readonly bool Contains(int x, int y)
Parameters
Returns
Equals(Rectangle)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Rectangle other)
Parameters
otherRectangleAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(Rectangle, Rectangle)
public static bool operator ==(Rectangle left, Rectangle right)
Parameters
Returns
operator !=(Rectangle, Rectangle)
public static bool operator !=(Rectangle left, Rectangle right)