Function

AbsoluteCutCornerShape

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(corner: CornerSize) =
    AbsoluteCutCornerShape(corner, corner, corner, corner)

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

Parameters

corner CornerSize to apply.

AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(size: Dp) = AbsoluteCutCornerShape(CornerSize(size))

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

Parameters

size Size in Dp to apply.

AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(size: Float) = AbsoluteCutCornerShape(CornerSize(size))

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

Parameters

size Size in pixels to apply.

AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(percent: Int) = AbsoluteCutCornerShape(CornerSize(percent))

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

Parameters

percent Size in percents to apply.

AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(
    topLeft: Dp = 0.dp,
    topRight: Dp = 0.dp,
    bottomRight: Dp = 0.dp,
    bottomLeft: Dp = 0.dp,
) =
    AbsoluteCutCornerShape(
        topLeft = CornerSize(topLeft),
        topRight = CornerSize(topRight),
        bottomRight = CornerSize(bottomRight),
        bottomLeft = CornerSize(bottomLeft),
    )

Creates AbsoluteCutCornerShape with sizes defined in Dp.


AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(
    topLeft: Float = 0.0f,
    topRight: Float = 0.0f,
    bottomRight: Float = 0.0f,
    bottomLeft: Float = 0.0f,
) =
    AbsoluteCutCornerShape(
        topLeft = CornerSize(topLeft),
        topRight = CornerSize(topRight),
        bottomRight = CornerSize(bottomRight),
        bottomLeft = CornerSize(bottomLeft),
    )

Creates AbsoluteCutCornerShape with sizes defined in float.


AbsoluteCutCornerShape

Common
fun AbsoluteCutCornerShape(
    @IntRange(from = 0, to = 100) topLeftPercent: Int = 0,
    @IntRange(from = 0, to = 100) topRightPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomRightPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomLeftPercent: Int = 0,
) =
    AbsoluteCutCornerShape(
        topLeft = CornerSize(topLeftPercent),
        topRight = CornerSize(topRightPercent),
        bottomRight = CornerSize(bottomRightPercent),
        bottomLeft = CornerSize(bottomLeftPercent),
    )

Creates AbsoluteCutCornerShape with sizes defined in percents of the shape's smaller side.

Parameters

topLeftPercent The top left corner clip size as a percentage of the smaller side, with a range of 0 - 100.
topRightPercent The top right corner clip size as a percentage of the smaller side, with a range of 0 - 100.
bottomRightPercent The bottom right clip size radius as a percentage of the smaller side, with a range of 0 - 100.
bottomLeftPercent The bottom left clip size radius as a percentage of the smaller side, with a range of 0 - 100.