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.inflateBySizebut 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.inflatebut 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 theouterrectangle -
shiftBottomRightOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is positioned within the bottom-right of theouterrectangle -
shiftCenterLeftOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is positioned within the center-left of theouterrectangle -
shiftCenterOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is centered on theouterrectangle -
shiftCenterRightOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is positioned within the center-right of theouterrectangle -
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 theouterrectangle -
shiftTopRightOf(
Rect outer) → Rect -
Available on Rect, provided by the RectExtension extension
Returns a new rectangle that is positioned within the top-right of theouterrectangle