toRegion

inline fun Rect.toRegion(): Region(source)

Returns a Region representation of this rectangle.


inline fun RectF.toRegion(): Region(source)

Returns a Region representation of this rectangle. The resulting rect will be sized such that this rect can fit within it.