RectIntclass

Represents a rectangle but with whole numbers

objectRectInt
Namespace
Sandbox
Assembly
Sandbox.System
Declaration
public sealed struct Sandbox.RectInt

Constructors2

Showing 2 constructors

Methods12

Showing 12 methods

Properties14

Showing 14 properties

public int Sandbox.RectInt.Bottom { get; set; }PUBLICGETSET

Position of rect's bottom edge relative to its parent.

Returns:int

public Vector2Int Sandbox.RectInt.BottomLeft { get; set; }PUBLICGETSET

Position of the bottom left edge of this rect.

Returns:Vector2Int

public Vector2Int Sandbox.RectInt.BottomRight { get; set; }PUBLICGETSET

Position of the bottom right edge of this rect.

Returns:Vector2Int

public int Sandbox.RectInt.Height { get; set; }PUBLICGETSET

Height of the rect.

Returns:int

public int Sandbox.RectInt.Left { get; set; }PUBLICGETSET

Position of rect's left edge relative to its parent, can also be interpreted as its position on the X axis.

Returns:int

public int Sandbox.RectInt.Right { get; set; }PUBLICGETSET

Position of rect's right edge relative to its parent.

Returns:int

public int Sandbox.RectInt.Top { get; set; }PUBLICGETSET

Position of rect's top edge relative to its parent, can also be interpreted as its position on the Y axis.

Returns:int

public int Sandbox.RectInt.Width { get; set; }PUBLICGETSET

Width of the rect.

Returns:int

public Sandbox.RectInt Sandbox.RectInt.WithoutPosition { get; set; }PUBLICGETSET

Returns this rect with position set to 0 on both axes.

Returns:RectInt

On this page

Constructorspublic RectInt(System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height)public RectInt(Vector2Int point, Vector2Int size = null)Methodspublic System.Void Add(Sandbox.RectInt r)public System.Void Add(Vector2Int point)public Sandbox.RectInt AddPoint(Vector2Int pos)public static Sandbox.RectInt FromPoints(Vector2Int a, Vector2Int b)public Sandbox.RectInt Grow(System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom)public Sandbox.RectInt Grow(System.Int32 x, System.Int32 y)public Sandbox.RectInt Grow(System.Int32 amt)public System.Boolean IsInside(Sandbox.RectInt rect, System.Boolean fullyInside = False)public System.Boolean IsInside(Vector2Int pos)public Sandbox.RectInt Shrink(System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom)public Sandbox.RectInt Shrink(System.Int32 x, System.Int32 y)public Sandbox.RectInt Shrink(System.Int32 amt)Propertiespublic System.Int32 Sandbox.RectInt.Bottom { get; set; }public Vector2Int Sandbox.RectInt.BottomLeft { get; set; }public Vector2Int Sandbox.RectInt.BottomRight { get; set; }public Vector2 Sandbox.RectInt.Center { get; set; }public System.Int32 Sandbox.RectInt.Height { get; set; }public System.Int32 Sandbox.RectInt.Left { get; set; }public Vector2Int Sandbox.RectInt.Position { get; set; }public System.Int32 Sandbox.RectInt.Right { get; set; }public Vector2Int Sandbox.RectInt.Size { get; set; }public System.Int32 Sandbox.RectInt.Top { get; set; }public Vector2Int Sandbox.RectInt.TopLeft { get; set; }public Vector2Int Sandbox.RectInt.TopRight { get; set; }public System.Int32 Sandbox.RectInt.Width { get; set; }public Sandbox.RectInt Sandbox.RectInt.WithoutPosition { get; set; }Metadata