core-ktx / androidx.graphics / android.graphics.RectF / toRegion

toRegion

inline fun RectF.toRegion(): Region

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