S&box Wiki

Rect

Rect

Fields

float bottom
float left
float right
float top

Properties

Vector2 Center { get; }
Vector2 EdgeSize { get; }
When the Rect describes edges, this returns the total size of the edges in each direction
float height { get; set; }
Vector2 Position { get; set; }
Vector2 Size { get; set; }
float width { get; set; }

Methods

Rect Contract( Sandbox.UI.Margin m )
Where padding is an edge type rect, will return this rect contracted with those edges.
Rect Expand( float f )
Rect Grow( float left, float top, float right, float bottom )
bool IsInside( Rect rect )
Return true if the passed rect is partially or fully inside
Rect Shrink( float left, float top, float right, float bottom )
Where padding is an edge type rect, will return this rect contracted with those edges.

Special Pages


Wikis

?

Render Time: 11ms

DB GetPage 2
Generate Html 0
SaveChanges (1) 5
Render Body 0
Render Sidebar 0