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 givensize
. This method is similar toMap.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 givensize
. This method is similar toMap.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 theouter
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 theouter
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 theouter
rectangle -
shiftCenterOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is centered on theouter
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 theouter
rectangle -
shiftToNormal(
Rect rect) → (Rect, Rect) -
Available on Rect, provided by the RectExtension extension
Returns two rectangles (current andrect
) 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 theouter
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 theouter
rectangle