centerOn

fun Size.centerOn(rect: Rect): Rect

Center a size on a given rectangle. The size may be larger or smaller than the rect.