getCornerScale

fun getCornerScale(width: Float, height: Float, density: Float): Float

Returns a scale factor for the corner size, which will prevent graphical glitches in case the size of the corners is larger than the shape’s dimensions.

Parameters

width

the width of the Shape.

height

the height of the Shape.

density

the pixel density of the screen (used in pixel size calculation).