smooth

fun Rectangle.smooth(curvature: Float): Path

Creates a smooth Path resembling a superellipse based on this Rectangle.

Return

a Path representing the shape

Parameters

curvature

used to determine how smooth the corners are. 0f means no curvature and 1f means full curvature, creating an ellipse. A value of 0.5 will create a squircle.