Namespace: | Sirenix.Utilities |
Assembly: | Sirenix.Utilities |
public static class RectExtensions
public static Rect AddMax(this Rect rect, Vector2 value)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | value | The value to add. |
UnityEngine.Rect |
public static Rect AddMin(this Rect rect, Vector2 value)
UnityEngine.Rect | rect | The original rect. |
UnityEngine.Vector2 | value | The value to add. |
UnityEngine.Rect |
public static Rect AddPosition(this Rect rect, float x, float y)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The x. |
System.Single | y | The y. |
UnityEngine.Rect |
public static Rect AddPosition(this Rect rect, Vector2 move)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | move | The change in position. |
UnityEngine.Rect |
public static Rect AddX(this Rect rect, float x)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The value to add. |
UnityEngine.Rect |
public static Rect AddXMax(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to add. |
UnityEngine.Rect |
public static Rect AddXMin(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to add. |
UnityEngine.Rect |
public static Rect AddY(this Rect rect, float y)
UnityEngine.Rect | rect | The original Rect. |
System.Single | y | The value to add. |
UnityEngine.Rect |
public static Rect AddYMax(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to add. |
UnityEngine.Rect |
public static Rect AddYMin(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to add. |
UnityEngine.Rect |
public static Rect AlignBottom(this Rect rect, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenter(this Rect rect, float width)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenter(this Rect rect, float width, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenterX(this Rect rect, float width)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenterXY(this Rect rect, float size)
UnityEngine.Rect | rect | The original Rect. |
System.Single | size | The desired width and height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenterXY(this Rect rect, float width, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignCenterY(this Rect rect, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignLeft(this Rect rect, float width)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
UnityEngine.Rect |
public static Rect AlignMiddle(this Rect rect, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect AlignRight(this Rect rect, float width)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
UnityEngine.Rect |
public static Rect AlignRight(this Rect rect, float width, bool clamp)
UnityEngine.Rect | rect | |
System.Single | width | |
System.Boolean | clamp |
UnityEngine.Rect |
public static Rect AlignTop(this Rect rect, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect Expand(this Rect rect, float expand)
UnityEngine.Rect | rect | The original Rect. |
System.Single | expand | The desired expansion. |
UnityEngine.Rect |
public static Rect Expand(this Rect rect, float horizontal, float vertical)
UnityEngine.Rect | rect | The original Rect. |
System.Single | horizontal | The desired expansion on the X-axis. |
System.Single | vertical | The desired expansion on the Y-axis. |
UnityEngine.Rect |
public static Rect Expand(this Rect rect, float left, float right, float top, float bottom)
UnityEngine.Rect | rect | The original Rect. |
System.Single | left | The desired expansion on the left. |
System.Single | right | The desired expansion on the right. |
System.Single | top | The desired expansion on the top. |
System.Single | bottom | The desired expansion on the bottom. |
UnityEngine.Rect |
public static Rect ExpandTo(this Rect rect, Vector2 pos)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | pos | The position to expand the rect towards. |
UnityEngine.Rect |
public static Rect HorizontalPadding(this Rect rect, float padding)
UnityEngine.Rect | rect | The original Rect. |
System.Single | padding | The desired padding. |
UnityEngine.Rect |
public static Rect HorizontalPadding(this Rect rect, float left, float right)
UnityEngine.Rect | rect | The original Rect. |
System.Single | left | Desired padding on the left side. |
System.Single | right | Desired padding on the right side. |
UnityEngine.Rect |
public static bool IsPlaceholder(this Rect rect)
UnityEngine.Rect | rect | The original UnityEngine.Rect. |
System.Boolean |
|
public static Rect MaxHeight(this Rect rect, float maxHeight)
UnityEngine.Rect | rect | The original Rect. |
System.Single | maxHeight | The desired max height. |
UnityEngine.Rect |
public static Rect MaxWidth(this Rect rect, float maxWidth)
UnityEngine.Rect | rect | The original Rect. |
System.Single | maxWidth | The desired max width. |
UnityEngine.Rect |
public static Rect MinHeight(this Rect rect, float minHeight)
UnityEngine.Rect | rect | The original Rect. |
System.Single | minHeight | The desired min height. |
UnityEngine.Rect |
public static Rect MinWidth(this Rect rect, float minWidth)
UnityEngine.Rect | rect | The original Rect. |
System.Single | minWidth | The desired min width. |
UnityEngine.Rect |
public static Rect Padding(this Rect rect, float padding)
UnityEngine.Rect | rect | The original Rect. |
System.Single | padding | The desired padding. |
UnityEngine.Rect |
public static Rect Padding(this Rect rect, float horizontal, float vertical)
UnityEngine.Rect | rect | The original Rect. |
System.Single | horizontal | The desired horizontal padding. |
System.Single | vertical | The desired vertical padding. |
UnityEngine.Rect |
public static Rect Padding(this Rect rect, float left, float right, float top, float bottom)
UnityEngine.Rect | rect | The original Rect. |
System.Single | left | The desired padding on the left. |
System.Single | right | The desired padding on the right. |
System.Single | top | The desired padding on the top. |
System.Single | bottom | The desired padding on the bottom. |
UnityEngine.Rect |
public static Rect ResetPosition(this Rect rect)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Rect |
public static Rect SetCenter(this Rect rect, float x, float y)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The desired center X position. |
System.Single | y | The desired center Y position. |
UnityEngine.Rect |
public static Rect SetCenter(this Rect rect, Vector2 center)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | center | The desired center position. |
UnityEngine.Rect |
public static Rect SetCenterX(this Rect rect, float x)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The desired center x position. |
UnityEngine.Rect |
public static Rect SetCenterY(this Rect rect, float y)
UnityEngine.Rect | rect | The desired original Rect. |
System.Single | y | The desired desired center y position. |
UnityEngine.Rect |
public static Rect SetHeight(this Rect rect, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect SetMax(this Rect rect, Vector2 max)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | max | The desired max position. |
UnityEngine.Rect |
public static Rect SetMin(this Rect rect, Vector2 min)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | min | The desired min position. |
UnityEngine.Rect |
public static Rect SetPosition(this Rect rect, Vector2 position)
UnityEngine.Rect | rect | The orignal Rect. |
UnityEngine.Vector2 | position | The desired position. |
UnityEngine.Rect |
public static Rect SetSize(this Rect rect, float widthAndHeight)
UnityEngine.Rect | rect | The original Rect. |
System.Single | widthAndHeight | The desired width and height of the new Rect. |
UnityEngine.Rect |
public static Rect SetSize(this Rect rect, float width, float height)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
System.Single | height | The desired height of the new Rect. |
UnityEngine.Rect |
public static Rect SetSize(this Rect rect, Vector2 size)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | size | The desired size of the new Rect. |
UnityEngine.Rect |
public static Rect SetWidth(this Rect rect, float width)
UnityEngine.Rect | rect | The original Rect. |
System.Single | width | The desired width of the new Rect. |
UnityEngine.Rect |
public static Rect SetX(this Rect rect, float x)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The desired X position. |
UnityEngine.Rect |
public static Rect SetXMax(this Rect rect, float xMax)
UnityEngine.Rect | rect | The original Rect. |
System.Single | xMax | The desired X max position. |
UnityEngine.Rect |
public static Rect SetXMin(this Rect rect, float xMin)
UnityEngine.Rect | rect | The original Rect. |
System.Single | xMin | The desired min X position. |
UnityEngine.Rect |
public static Rect SetY(this Rect rect, float y)
UnityEngine.Rect | rect | The original Rect. |
System.Single | y | The desired Y position. |
UnityEngine.Rect |
public static Rect SetYMax(this Rect rect, float yMax)
UnityEngine.Rect | rect | The original Rect. |
System.Single | yMax | The desired Y max position. |
UnityEngine.Rect |
public static Rect SetYMin(this Rect rect, float yMin)
UnityEngine.Rect | rect | The original Rect. |
System.Single | yMin | The desired Y min. |
UnityEngine.Rect |
public static Rect Split(this Rect rect, int index, int count)
UnityEngine.Rect | rect | The original Rect. |
System.Int32 | index | The index for the subrect. Includes 0, and excludes count. |
System.Int32 | count | The amount of subrects the Rect should be split into. |
UnityEngine.Rect |
public static Rect SplitGrid(this Rect rect, float width, float height, int index)
UnityEngine.Rect | rect | The original rect. |
System.Single | width | The width of a grid cell. |
System.Single | height | The height of a grid cell. |
System.Int32 | index | The index of the grid cell. |
UnityEngine.Rect |
public static Rect SplitTableGrid(this Rect rect, int columnCount, float rowHeight, int index)
UnityEngine.Rect | rect | |
System.Int32 | columnCount | |
System.Single | rowHeight | |
System.Int32 | index |
UnityEngine.Rect |
public static Rect SplitVertical(this Rect rect, int index, int count)
UnityEngine.Rect | rect | The original Rect. |
System.Int32 | index | The index for the subrect. Includes 0, and excludes count. |
System.Int32 | count | The amount of subrects the Rect should be split into. |
UnityEngine.Rect |
public static Rect SubMax(this Rect rect, Vector2 value)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | value | The value to add. |
UnityEngine.Rect |
public static Rect SubMin(this Rect rect, Vector2 value)
UnityEngine.Rect | rect | The original Rect. |
UnityEngine.Vector2 | value | The vlaue to subtract. |
UnityEngine.Rect |
public static Rect SubX(this Rect rect, float x)
UnityEngine.Rect | rect | The original Rect. |
System.Single | x | The value to subtract. |
UnityEngine.Rect |
public static Rect SubXMax(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to subtract. |
UnityEngine.Rect |
public static Rect SubXMin(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to subtract. |
UnityEngine.Rect |
public static Rect SubY(this Rect rect, float y)
UnityEngine.Rect | rect | The original Rect. |
System.Single | y | The value to subtract. |
UnityEngine.Rect |
public static Rect SubYMax(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to subtract. |
UnityEngine.Rect |
public static Rect SubYMin(this Rect rect, float value)
UnityEngine.Rect | rect | The original Rect. |
System.Single | value | The value to subtract. |
UnityEngine.Rect |
public static Rect TakeFromBottom(this ref Rect rect, float height)
UnityEngine.Rect | rect | |
System.Single | height |
UnityEngine.Rect |
public static Rect TakeFromDir(this ref Rect rect, float width, Direction direction)
UnityEngine.Rect | rect | |
System.Single | width | |
Direction | direction |
UnityEngine.Rect |
public static Rect TakeFromLeft(this ref Rect rect, float width)
UnityEngine.Rect | rect | |
System.Single | width |
UnityEngine.Rect |
public static Rect TakeFromRight(this ref Rect rect, float width)
UnityEngine.Rect | rect | |
System.Single | width |
UnityEngine.Rect |
public static Rect TakeFromTop(this ref Rect rect, float height)
UnityEngine.Rect | rect | |
System.Single | height |
UnityEngine.Rect |
public static Rect VerticalPadding(this Rect rect, float padding)
UnityEngine.Rect | rect | The original Rect. |
System.Single | padding | The desired padding. |
UnityEngine.Rect |
public static Rect VerticalPadding(this Rect rect, float top, float bottom)
UnityEngine.Rect | rect | The original Rect. |
System.Single | top | The desired padding on the top. |
System.Single | bottom | The desired padding on the bottom. |
UnityEngine.Rect |