Version 3.0.1.0

RectExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class RectExtensions
Inheritance
  • System.Object
  • RectExtensions

Methods

AddMax(Rect, Vector2)
public static Rect AddMax(this Rect rect, Vector2 value)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 value

Returns
UnityEngine.Rect

AddMin(Rect, Vector2)
public static Rect AddMin(this Rect rect, Vector2 value)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 value

Returns
UnityEngine.Rect

AddPosition(Rect, Single, Single)
public static Rect AddPosition(this Rect rect, float x, float y)
Parameters
UnityEngine.Rect rect

System.Single x

System.Single y

Returns
UnityEngine.Rect

AddPosition(Rect, Vector2)
public static Rect AddPosition(this Rect rect, Vector2 move)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 move

Returns
UnityEngine.Rect

AddX(Rect, Single)
public static Rect AddX(this Rect rect, float x)
Parameters
UnityEngine.Rect rect

System.Single x

Returns
UnityEngine.Rect

AddXMax(Rect, Single)
public static Rect AddXMax(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

AddXMin(Rect, Single)
public static Rect AddXMin(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

AddY(Rect, Single)
public static Rect AddY(this Rect rect, float y)
Parameters
UnityEngine.Rect rect

System.Single y

Returns
UnityEngine.Rect

AddYMax(Rect, Single)
public static Rect AddYMax(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

AddYMin(Rect, Single)
public static Rect AddYMin(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

AlignBottom(Rect, Single)
public static Rect AlignBottom(this Rect rect, float height)
Parameters
UnityEngine.Rect rect

System.Single height

Returns
UnityEngine.Rect

AlignCenter(Rect, Single)
public static Rect AlignCenter(this Rect rect, float width)
Parameters
UnityEngine.Rect rect

System.Single width

Returns
UnityEngine.Rect

AlignCenter(Rect, Single, Single)
public static Rect AlignCenter(this Rect rect, float width, float height)
Parameters
UnityEngine.Rect rect

System.Single width

System.Single height

Returns
UnityEngine.Rect

AlignCenterX(Rect, Single)
public static Rect AlignCenterX(this Rect rect, float width)
Parameters
UnityEngine.Rect rect

System.Single width

Returns
UnityEngine.Rect

AlignCenterXY(Rect, Single)
public static Rect AlignCenterXY(this Rect rect, float size)
Parameters
UnityEngine.Rect rect

System.Single size

Returns
UnityEngine.Rect

AlignCenterXY(Rect, Single, Single)
public static Rect AlignCenterXY(this Rect rect, float width, float height)
Parameters
UnityEngine.Rect rect

System.Single width

System.Single height

Returns
UnityEngine.Rect

AlignCenterY(Rect, Single)
public static Rect AlignCenterY(this Rect rect, float height)
Parameters
UnityEngine.Rect rect

System.Single height

Returns
UnityEngine.Rect

AlignLeft(Rect, Single)
public static Rect AlignLeft(this Rect rect, float width)
Parameters
UnityEngine.Rect rect

System.Single width

Returns
UnityEngine.Rect

AlignMiddle(Rect, Single)
public static Rect AlignMiddle(this Rect rect, float height)
Parameters
UnityEngine.Rect rect

System.Single height

Returns
UnityEngine.Rect

AlignRight(Rect, Single)
public static Rect AlignRight(this Rect rect, float width)
Parameters
UnityEngine.Rect rect

System.Single width

Returns
UnityEngine.Rect

AlignRight(Rect, Single, Boolean)
public static Rect AlignRight(this Rect rect, float width, bool clamp)
Parameters
UnityEngine.Rect rect

System.Single width

System.Boolean clamp

Returns
UnityEngine.Rect

AlignTop(Rect, Single)
public static Rect AlignTop(this Rect rect, float height)
Parameters
UnityEngine.Rect rect

System.Single height

Returns
UnityEngine.Rect

Expand(Rect, Single)
public static Rect Expand(this Rect rect, float expand)
Parameters
UnityEngine.Rect rect

System.Single expand

Returns
UnityEngine.Rect

Expand(Rect, Single, Single)
public static Rect Expand(this Rect rect, float horizontal, float vertical)
Parameters
UnityEngine.Rect rect

System.Single horizontal

System.Single vertical

Returns
UnityEngine.Rect

Expand(Rect, Single, Single, Single, Single)
public static Rect Expand(this Rect rect, float left, float right, float top, float bottom)
Parameters
UnityEngine.Rect rect

System.Single left

System.Single right

System.Single top

System.Single bottom

Returns
UnityEngine.Rect

ExpandTo(Rect, Vector2)
public static Rect ExpandTo(this Rect rect, Vector2 pos)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 pos

Returns
UnityEngine.Rect

HorizontalPadding(Rect, Single)
public static Rect HorizontalPadding(this Rect rect, float padding)
Parameters
UnityEngine.Rect rect

System.Single padding

Returns
UnityEngine.Rect

HorizontalPadding(Rect, Single, Single)
public static Rect HorizontalPadding(this Rect rect, float left, float right)
Parameters
UnityEngine.Rect rect

System.Single left

System.Single right

Returns
UnityEngine.Rect

MaxHeight(Rect, Single)
public static Rect MaxHeight(this Rect rect, float maxHeight)
Parameters
UnityEngine.Rect rect

System.Single maxHeight

Returns
UnityEngine.Rect

MaxWidth(Rect, Single)
public static Rect MaxWidth(this Rect rect, float maxWidth)
Parameters
UnityEngine.Rect rect

System.Single maxWidth

Returns
UnityEngine.Rect

MinHeight(Rect, Single)
public static Rect MinHeight(this Rect rect, float minHeight)
Parameters
UnityEngine.Rect rect

System.Single minHeight

Returns
UnityEngine.Rect

MinWidth(Rect, Single)
public static Rect MinWidth(this Rect rect, float minWidth)
Parameters
UnityEngine.Rect rect

System.Single minWidth

Returns
UnityEngine.Rect

Padding(Rect, Single)
public static Rect Padding(this Rect rect, float padding)
Parameters
UnityEngine.Rect rect

System.Single padding

Returns
UnityEngine.Rect

Padding(Rect, Single, Single)
public static Rect Padding(this Rect rect, float horizontal, float vertical)
Parameters
UnityEngine.Rect rect

System.Single horizontal

System.Single vertical

Returns
UnityEngine.Rect

Padding(Rect, Single, Single, Single, Single)
public static Rect Padding(this Rect rect, float left, float right, float top, float bottom)
Parameters
UnityEngine.Rect rect

System.Single left

System.Single right

System.Single top

System.Single bottom

Returns
UnityEngine.Rect

ResetPosition(Rect)
public static Rect ResetPosition(this Rect rect)
Parameters
UnityEngine.Rect rect

Returns
UnityEngine.Rect

SetCenter(Rect, Single, Single)
public static Rect SetCenter(this Rect rect, float x, float y)
Parameters
UnityEngine.Rect rect

System.Single x

System.Single y

Returns
UnityEngine.Rect

SetCenter(Rect, Vector2)
public static Rect SetCenter(this Rect rect, Vector2 center)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 center

Returns
UnityEngine.Rect

SetCenterX(Rect, Single)
public static Rect SetCenterX(this Rect rect, float x)
Parameters
UnityEngine.Rect rect

System.Single x

Returns
UnityEngine.Rect

SetCenterY(Rect, Single)
public static Rect SetCenterY(this Rect rect, float y)
Parameters
UnityEngine.Rect rect

System.Single y

Returns
UnityEngine.Rect

SetHeight(Rect, Single)
public static Rect SetHeight(this Rect rect, float height)
Parameters
UnityEngine.Rect rect

System.Single height

Returns
UnityEngine.Rect

SetMax(Rect, Vector2)
public static Rect SetMax(this Rect rect, Vector2 max)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 max

Returns
UnityEngine.Rect

SetMin(Rect, Vector2)
public static Rect SetMin(this Rect rect, Vector2 min)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 min

Returns
UnityEngine.Rect

SetPosition(Rect, Vector2)
public static Rect SetPosition(this Rect rect, Vector2 position)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 position

Returns
UnityEngine.Rect

SetSize(Rect, Single, Single)
public static Rect SetSize(this Rect rect, float width, float height)
Parameters
UnityEngine.Rect rect

System.Single width

System.Single height

Returns
UnityEngine.Rect

SetSize(Rect, Vector2)
public static Rect SetSize(this Rect rect, Vector2 size)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 size

Returns
UnityEngine.Rect

SetWidth(Rect, Single)
public static Rect SetWidth(this Rect rect, float width)
Parameters
UnityEngine.Rect rect

System.Single width

Returns
UnityEngine.Rect

SetX(Rect, Single)
public static Rect SetX(this Rect rect, float x)
Parameters
UnityEngine.Rect rect

System.Single x

Returns
UnityEngine.Rect

SetXMax(Rect, Single)
public static Rect SetXMax(this Rect rect, float xMax)
Parameters
UnityEngine.Rect rect

System.Single xMax

Returns
UnityEngine.Rect

SetXMin(Rect, Single)
public static Rect SetXMin(this Rect rect, float xMin)
Parameters
UnityEngine.Rect rect

System.Single xMin

Returns
UnityEngine.Rect

SetY(Rect, Single)
public static Rect SetY(this Rect rect, float y)
Parameters
UnityEngine.Rect rect

System.Single y

Returns
UnityEngine.Rect

SetYMax(Rect, Single)
public static Rect SetYMax(this Rect rect, float yMax)
Parameters
UnityEngine.Rect rect

System.Single yMax

Returns
UnityEngine.Rect

SetYMin(Rect, Single)
public static Rect SetYMin(this Rect rect, float yMin)
Parameters
UnityEngine.Rect rect

System.Single yMin

Returns
UnityEngine.Rect

Split(Rect, Int32, Int32)
public static Rect Split(this Rect rect, int index, int count)
Parameters
UnityEngine.Rect rect

System.Int32 index

System.Int32 count

Returns
UnityEngine.Rect

SplitGrid(Rect, Single, Single, Int32)
public static Rect SplitGrid(this Rect rect, float width, float height, int index)
Parameters
UnityEngine.Rect rect

System.Single width

System.Single height

System.Int32 index

Returns
UnityEngine.Rect

SplitTableGrid(Rect, Int32, Single, Int32)
public static Rect SplitTableGrid(this Rect rect, int columnCount, float rowHeight, int index)
Parameters
UnityEngine.Rect rect

System.Int32 columnCount

System.Single rowHeight

System.Int32 index

Returns
UnityEngine.Rect

SplitVertical(Rect, Int32, Int32)
public static Rect SplitVertical(this Rect rect, int index, int count)
Parameters
UnityEngine.Rect rect

System.Int32 index

System.Int32 count

Returns
UnityEngine.Rect

SubMax(Rect, Vector2)
public static Rect SubMax(this Rect rect, Vector2 value)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 value

Returns
UnityEngine.Rect

SubMin(Rect, Vector2)
public static Rect SubMin(this Rect rect, Vector2 value)
Parameters
UnityEngine.Rect rect

UnityEngine.Vector2 value

Returns
UnityEngine.Rect

SubX(Rect, Single)
public static Rect SubX(this Rect rect, float x)
Parameters
UnityEngine.Rect rect

System.Single x

Returns
UnityEngine.Rect

SubXMax(Rect, Single)
public static Rect SubXMax(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

SubXMin(Rect, Single)
public static Rect SubXMin(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

SubY(Rect, Single)
public static Rect SubY(this Rect rect, float y)
Parameters
UnityEngine.Rect rect

System.Single y

Returns
UnityEngine.Rect

SubYMax(Rect, Single)
public static Rect SubYMax(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

SubYMin(Rect, Single)
public static Rect SubYMin(this Rect rect, float value)
Parameters
UnityEngine.Rect rect

System.Single value

Returns
UnityEngine.Rect

VerticalPadding(Rect, Single)
public static Rect VerticalPadding(this Rect rect, float padding)
Parameters
UnityEngine.Rect rect

System.Single padding

Returns
UnityEngine.Rect

VerticalPadding(Rect, Single, Single)
public static Rect VerticalPadding(this Rect rect, float top, float bottom)
Parameters
UnityEngine.Rect rect

System.Single top

System.Single bottom

Returns
UnityEngine.Rect