RectExtensionMethods
interludesoftware.tick¶
Interlude.Tick¶
RectExtensionMethods Class¶
Inheritance System.Object → RectExtensionMethods
Methods¶
RectExtensionMethods.Bottom(this Rect, Size) Method¶
Returns a sub-rect taken from the bottom of rect with the height given by s. Negative values measure from the top.
Parameters¶
rect UnityEngine.Rect
s Size
Returns¶
RectExtensionMethods.BottomHalf(this Rect) Method¶
Returns the bottom 50% of rect.
Parameters¶
rect UnityEngine.Rect
Returns¶
RectExtensionMethods.Center(this Rect, Size) Method¶
Returns a square rect of the given size centred within rect.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.Center(this Rect, Size, Size) Method¶
Returns a rect of the given width and height centred within rect.
Parameters¶
rect UnityEngine.Rect
width Size
height Size
Returns¶
RectExtensionMethods.CenterHorizontal(this Rect, Size) Method¶
Returns a rect of the given width centred horizontally within rect.
Parameters¶
rect UnityEngine.Rect
width Size
Returns¶
RectExtensionMethods.CenterVertical(this Rect, Size) Method¶
Returns a rect of the given height centred vertically within rect.
Parameters¶
rect UnityEngine.Rect
height Size
Returns¶
RectExtensionMethods.EnsureValidDims(this Rect) Method¶
Returns a copy of rect with width and height forced to non-negative values, adjusting the origin accordingly.
Parameters¶
rect UnityEngine.Rect
Returns¶
RectExtensionMethods.Expand(this Rect, int) Method¶
Expands all four sides of rect by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Int32
Returns¶
RectExtensionMethods.InsetBottom(this Rect, Size, Size, Size) Method¶
Returns a fixed-size rect horizontally centred and anchored to the bottom edge of rect, offset inward by offsetY.
public static Rect InsetBottom(this Rect rect, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetBottomLeft(this Rect, Size, Size, Size, Size) Method¶
Returns a fixed-size rect anchored to the bottom-left corner of rect, offset inward by offsetX and offsetY.
public static Rect InsetBottomLeft(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetBottomRight(this Rect, Size, Size, Size, Size) Method¶
Returns a fixed-size rect anchored to the bottom-right corner of rect, offset inward by offsetX and offsetY.
public static Rect InsetBottomRight(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetLeft(this Rect, Size, Size, Size) Method¶
Returns a fixed-size rect vertically centred and anchored to the left edge of rect, offset inward by offsetX.
public static Rect InsetLeft(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetRight(this Rect, Size, Size, Size) Method¶
Returns a fixed-size rect vertically centred and anchored to the right edge of rect, offset inward by offsetX.
public static Rect InsetRight(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetTop(this Rect, Size, Size, Size) Method¶
Returns a fixed-size rect horizontally centred and anchored to the top edge of rect, offset inward by offsetY.
public static Rect InsetTop(this Rect rect, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetTopLeft(this Rect, Size, Size, Size, Size) Method¶
Returns a fixed-size rect anchored to the top-left corner of rect, offset inward by offsetX and offsetY.
public static Rect InsetTopLeft(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.InsetTopRight(this Rect, Size, Size, Size, Size) Method¶
Returns a fixed-size rect anchored to the top-right corner of rect, offset inward by offsetX and offsetY.
public static Rect InsetTopRight(this Rect rect, Interlude.Tick.Size offsetX, Interlude.Tick.Size offsetY, Interlude.Tick.Size width, Interlude.Tick.Size height);
Parameters¶
rect UnityEngine.Rect
offsetX Size
offsetY Size
width Size
height Size
Returns¶
RectExtensionMethods.Left(this Rect, Size) Method¶
Returns a sub-rect taken from the left of rect with the width given by s. Negative values measure from the right.
Parameters¶
rect UnityEngine.Rect
s Size
Returns¶
RectExtensionMethods.LeftHalf(this Rect) Method¶
Returns the left 50% of rect.
Parameters¶
rect UnityEngine.Rect
Returns¶
RectExtensionMethods.Pad(this Rect, float, float, float, float) Method¶
Shrinks rect by the specified per-side pixel amounts.
Parameters¶
rect UnityEngine.Rect
left System.Single
top System.Single
right System.Single
bottom System.Single
Returns¶
RectExtensionMethods.Pad(this Rect, int) Method¶
Shrinks all four sides of rect by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Int32
Returns¶
RectExtensionMethods.Pad(this Rect, Margin) Method¶
Shrinks rect by the amounts specified in margin.
Parameters¶
rect UnityEngine.Rect
margin Margin
Returns¶
RectExtensionMethods.Pad(this Rect, Size, Size, Size, Size) Method¶
Shrinks rect by the specified per-side Size amounts (pixel or percent).
public static Rect Pad(this Rect rect, Interlude.Tick.Size left, Interlude.Tick.Size top, Interlude.Tick.Size right, Interlude.Tick.Size bottom);
Parameters¶
rect UnityEngine.Rect
left Size
top Size
right Size
bottom Size
Returns¶
RectExtensionMethods.PadBottom(this Rect, float) Method¶
Shrinks rect from the bottom by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadBottom(this Rect, Size) Method¶
Shrinks rect from the bottom by size.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.PadHorizontal(this Rect, float) Method¶
Shrinks rect on the left and right by pixels each.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadHorizontal(this Rect, Size) Method¶
Shrinks rect on the left and right by size each.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.PadLeft(this Rect, float) Method¶
Shrinks rect from the left by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadLeft(this Rect, Size) Method¶
Shrinks rect from the left by size.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.PadRight(this Rect, float) Method¶
Shrinks rect from the right by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadRight(this Rect, Size) Method¶
Shrinks rect from the right by size.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.PadTop(this Rect, float) Method¶
Shrinks rect from the top by pixels.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadTop(this Rect, Size) Method¶
Shrinks rect from the top by size.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.PadVertical(this Rect, float) Method¶
Shrinks rect on the top and bottom by pixels each.
Parameters¶
rect UnityEngine.Rect
pixels System.Single
Returns¶
RectExtensionMethods.PadVertical(this Rect, Size) Method¶
Shrinks rect on the top and bottom by size each.
Parameters¶
rect UnityEngine.Rect
size Size
Returns¶
RectExtensionMethods.RectCenteredAtPoint(this Rect, Vector2, Vector2) Method¶
Returns a rect of the given size centred at point.
Parameters¶
rect UnityEngine.Rect
point UnityEngine.Vector2
size UnityEngine.Vector2
Returns¶
RectExtensionMethods.Right(this Rect, Size) Method¶
Returns a sub-rect taken from the right of rect with the width given by s. Negative values measure from the left.
Parameters¶
rect UnityEngine.Rect
s Size
Returns¶
RectExtensionMethods.RightHalf(this Rect) Method¶
Returns the right 50% of rect.
Parameters¶
rect UnityEngine.Rect
Returns¶
RectExtensionMethods.Top(this Rect, Size) Method¶
Returns a sub-rect taken from the top of rect with the height given by s. Negative values measure from the bottom.
Parameters¶
rect UnityEngine.Rect
s Size
Returns¶
RectExtensionMethods.TopHalf(this Rect) Method¶
Returns the top 50% of rect.
Parameters¶
rect UnityEngine.Rect