RectExtension extension

on

Methods

expandBySize(Size size) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle with only the right and bottom edges moved outwards by the given size. This method is similar to Map.inflateBySize but pins the top-left corner of the Rect
inflateBySize(Size size) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle with all edges moved outwards by the given size. This method is similar to Map.inflate but provides additional horiztonal and vertical control
shiftBottomLeftOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the bottom-left of the outer rectangle
shiftBottomRightOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the bottom-right of the outer rectangle
shiftCenterLeftOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the center-left of the outer rectangle
shiftCenterOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is centered on the outer rectangle
shiftCenterRightOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the center-right of the outer rectangle
shiftToNormal(Rect rect) → (Rect, Rect)

Available on Rect, provided by the RectExtension extension

Returns two rectangles (current and rect) where one is positioned at a (0,0) offset
shiftTopLeftOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the top-left of the outer rectangle
shiftTopRightOf(Rect outer) Rect

Available on Rect, provided by the RectExtension extension

Returns a new rectangle that is positioned within the top-right of the outer rectangle