androidx.compose.foundation.shape

CornerSize

Interface · from org.jetbrains.compose.foundation:foundation:1.12.2

The size of one corner. A CornerBasedShape has four of them.

CornerSize(8.dp)        // fixed size
CornerSize(50)          // percent of the shorter side of the shape
CornerSize(16f)         // pixels

You rarely need this. RoundedCornerShape and CutCornerShape accept Dp and percent values directly.

interface CornerSize

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a CornerSize.

Functions

toPx

fun toPx(shapeSize: Size, density: Density): Float

Converts the CornerSize to pixels.