Table of Contents

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

topLeft Point
size Point

Rectangle(int, int, int, int)

public Rectangle(int x, int y, int width, int height)

Parameters

x int
y int
width int
height int

Fields

Height

public int Height

Field Value

int

Width

public int Width

Field Value

int

X

public int X

Field Value

int

Y

public int Y

Field Value

int

Properties

Bottom

public int Bottom { get; }

Property Value

int

Left

public int Left { get; }

Property Value

int

Position

public Vector2 Position { get; }

Property Value

Vector2

Right

public int Right { get; }

Property Value

int

Size

public Vector2 Size { get; }

Property Value

Vector2

Top

public int Top { get; }

Property Value

int

Methods

Contains(Point)

public bool Contains(Point p)

Parameters

p Point

Returns

bool

Contains(int, int)

public bool Contains(int x, int y)

Parameters

x int
y int

Returns

bool

Equals(Rectangle)

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

public bool Equals(Rectangle other)

Parameters

other Rectangle

An object to compare with this object.

Returns

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.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

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

GetHashCode()

Returns the hash code for this instance.

public override 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

left Rectangle
right Rectangle

Returns

bool

operator !=(Rectangle, Rectangle)

public static bool operator !=(Rectangle left, Rectangle right)

Parameters

left Rectangle
right Rectangle

Returns

bool