The class used for specifying rectangular size and doing the rectangle math

C# | Visual Basic | Visual C++ |
public class Rectangle : ICloneable
Public Class Rectangle _ Implements ICloneable
public ref class Rectangle : ICloneable

All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
![]() | Rectangle()()()() |
Constructor
|
![]() | Rectangle(Single, Single, Single, Single) |
Constructor
|
![]() | Rectangle(Rect) |
Constructor
|
![]() | Bottom |
Y max getter
|
![]() | BottomRight | |
![]() | Center |
Returns rectangle center point (used for rotation)
|
![]() | CenterAsVector2 | |
![]() | CenterInside(Rectangle) |
Centers THIS rectangle inside the given outer rectangle
|
![]() ![]() | CenterRectangle(Rectangle, Rectangle) |
Centers the inner rectangle inside the given outer rectangle
|
![]() | Clone()()()() | |
![]() | Collapse(Single, Single, Single, Single) |
Collapses a rectangle
|
![]() | Collapse(Single) |
Collapses a rectangle
|
![]() | ConstrainWithin(Rectangle) |
Constrains this rectangle inside another rectangle's bounds
|
![]() | Contains(Point) |
Checks if a point is placed inside rectangle
|
![]() | Contains(Rectangle) |
Checks if a given rectangle is placed inside this rectangle
|
![]() | Equals(Object) | (Overrides Object.Equals(Object).) |
![]() | Equals(Rectangle) |
Equality
|
![]() | Expand(Single, Single, Single, Single) |
Expands a rectangle
|
![]() | Expand(Single) |
Expands a rectangle
|
![]() | Finalize()()()() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | From2Points(Point, Point) |
Creates a rectangle from 2 points
|
![]() ![]() | FromPositionAndSize(Point, Point) |
Creates a rectangle from position and size
|
![]() ![]() | FromRect(Rect) |
Converts from UnityEngine.Rect
|
![]() ![]() | FromSize(Point) |
Creates a rectangle from size
|
![]() ![]() | FromWidthAndHeight(Single, Single) |
Creates a rectangle from size
|
![]() ![]() | GetAlignBounds(Rectangle, Rectangle) |
Gets align bounds
|
![]() | GetHashCode()()()() | (Overrides Object.GetHashCode()()()().) |
![]() | GetType()()()() | Gets the type of the current instance. (Inherited from Object.) |
![]() | Height |
Height
|
![]() | Intersects(Rectangle) |
Returns true if two rectangles intersect
|
![]() | Left |
Alias for X
|
![]() | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MoveBy(Point) |
Moves original by delta
|
![]() | MoveByCopy(Point) |
Moves copy by delta
|
![]() | MoveTo(Point) |
Moves original
|
![]() | MoveToCopy(Point) |
Moves a copy
|
![]() | Position |
Returns rectangle position
|
![]() | Right |
X max getter
|
![]() | Size |
Returns rectangle size
|
![]() | Top |
Alias for Y
|
![]() | TopLeft | |
![]() | ToRect()()()() |
Converts to UnityEngine.Rect
|
![]() | ToString()()()() | (Overrides Object.ToString()()()().) |
![]() | Width |
Width
|
![]() | X |
X coordinate
|
![]() | Y |
Y coordinate
|
![]() ![]() | Zero |
Zero rectangle
|

Coded by Danko Kozar

Object | |
![]() | Rectangle |