Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.Rectangle

Malware edited this page Dec 21, 2018 · 51 revisions

Index

Rectangle Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Defines a rectangle.

Fields

_int X_ Specifies the x-coordinate of the rectangle.
_int Y_ Specifies the y-coordinate of the rectangle.
_int Width_ Specifies the width of the rectangle.
_int Height_ Specifies the height of the rectangle.
### Properties
_int Left_ Returns the x-coordinate of the left side of the rectangle.
_int Right_ Returns the x-coordinate of the right side of the rectangle.
_int Top_ Returns the y-coordinate of the top of the rectangle.
_int Bottom_ Returns the y-coordinate of the bottom of the rectangle.
_Point Location_ Gets or sets the upper-left value of the Rectangle.
_Point Center_ Gets the Point that specifies the center of the rectangle.
### Methods
_void Offset(Point amount)_ Changes the position of the Rectangle.
_void Offset(int offsetX, int offsetY)_ Changes the position of the Rectangle.
_void Inflate(int horizontalAmount, int verticalAmount)_ Pushes the edges of the Rectangle out by the horizontal and vertical values specified.
_bool Contains(int x, int y)_ Determines whether this Rectangle contains a specified point represented by its x- and y-coordinates.
_bool Contains(Point value)_ Determines whether this Rectangle contains a specified Point.
_void Contains(ref Point value, ref bool result)_ Determines whether this Rectangle contains a specified Point.
_bool Contains(Rectangle value)_ Determines whether this Rectangle entirely contains a specified Rectangle.
_void Contains(ref Rectangle value, ref bool result)_ Determines whether this Rectangle entirely contains a specified Rectangle.
_bool Intersects(Rectangle value)_ Determines whether a specified Rectangle intersects with this Rectangle.
_void Intersects(ref Rectangle value, ref bool result)_ Determines whether a specified Rectangle intersects with this Rectangle.
static _Rectangle Intersect(Rectangle value1, Rectangle value2)_ Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.
static _void Intersect(ref Rectangle value1, ref Rectangle value2, ref Rectangle result)_ Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.
static _Rectangle Union(Rectangle value1, Rectangle value2)_ Creates a new Rectangle that exactly contains two other rectangles.
static _void Union(ref Rectangle value1, ref Rectangle value2, ref Rectangle result)_ Creates a new Rectangle that exactly contains two other rectangles.
_bool Equals(Rectangle other)_ Determines whether the specified Object is equal to the Rectangle.
_bool Equals(Object obj)_ Returns a value that indicates whether the current instance is equal to a specified object.
_string ToString()_ Retrieves a string representation of the current object.
_int GetHashCode()_ Gets the hash code for this object.

Clone this wiki locally