s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
RectInt
chevron_left
Classes
struct
RectInt
search
Constructors
functions
RectInt
Properties
data_object
Bottom
data_object
BottomLeft
data_object
BottomRight
data_object
Center
data_object
Height
data_object
Left
data_object
Position
data_object
Right
data_object
Size
data_object
Top
data_object
TopLeft
data_object
TopRight
data_object
Width
data_object
WithoutPosition
Methods
functions
Add
functions
AddPoint
functions
Grow
functions
IsInside
functions
Shrink
Static Methods
functions
FromPoints
RectInt
Represents a rectangle but with whole numbers
struct
Sandbox
.
sealed
Sandbox.System
build
Constructors
1
RectInt
(
x
,
y
,
width
,
height
)
Initialize a Rect at given position and with given size.
data_object
Properties
14
Bottom
int
Position of rect's bottom edge relative to its parent.
BottomLeft
Vector2Int
Position of the bottom left edge of this rect.
BottomRight
Vector2Int
Position of the bottom right edge of this rect.
Center
Vector2
Center of this rect.
Height
int
Height of the rect.
Left
int
Position of rect's left edge relative to its parent, can also be interpreted as its position on the X axis.
Position
Vector2Int
Position of this rect.
Right
int
Position of rect's right edge relative to its parent.
Size
Vector2Int
Size of this rect.
Top
int
Position of rect's top edge relative to its parent, can also be interpreted as its position on the Y axis.
TopLeft
Vector2Int
Position of the top left edge of this rect.
TopRight
Vector2Int
Position of the top right edge of this rect.
Width
int
Width of the rect.
WithoutPosition
RectInt
Returns this rect with position set to 0 on both axes.
functions
Methods
5
Add
(
r
)
Expand this Rect to contain the other rect
AddPoint
(
pos
)
RectInt
Returns this rect expanded to include this point
Grow
(
left
,
top
,
right
,
bottom
)
RectInt
Returns a Rect grown in every direction by given amounts.
IsInside
(
rect
,
fullyInside
)
bool
Return true if the passed rect is partially or fully inside this rect.
Shrink
(
left
,
top
,
right
,
bottom
)
RectInt
Returns a Rect shrunk in every direction by given values.
functions
Static Methods
1
FromPoints
(
a
,
b
)
RectInt
Create a rect between two points. The order of the points doesn't matter.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.