Android 12 Developer Preview is here! Try it out, and give us your feedback!

CutCornerShape

class CutCornerShape : CornerBasedShape
kotlin.Any
   ↳ androidx.compose.foundation.shape.CornerBasedShape
   ↳ androidx.compose.foundation.shape.CutCornerShape

A shape describing the rectangle with cut corners. Corner size is representing the cut length - the size of both legs of the cut's right triangle.

This shape will automatically mirror the corner sizes in LayoutDirection.Rtl, use AbsoluteCutCornerShape for the layout direction unaware version of this shape.

Summary

Public constructors
<init>(topStart: CornerSize, topEnd: CornerSize, bottomEnd: CornerSize, bottomStart: CornerSize)

A shape describing the rectangle with cut corners.

Public methods
CutCornerShape
copy(topStart: CornerSize, topEnd: CornerSize, bottomEnd: CornerSize, bottomStart: CornerSize)

Creates a copy of this Shape with a new corner sizes.

Outline
createOutline(size: Size, topStart: Float, topEnd: Float, bottomEnd: Float, bottomStart: Float, layoutDirection: LayoutDirection)

Creates Outline of this shape for the given size.

Boolean
equals(other: Any?)

Int

String

Inherited functions
Inherited properties

Public constructors

<init>

CutCornerShape(
    topStart: CornerSize,
    topEnd: CornerSize,
    bottomEnd: CornerSize,
    bottomStart: CornerSize)

A shape describing the rectangle with cut corners. Corner size is representing the cut length - the size of both legs of the cut's right triangle.

This shape will automatically mirror the corner sizes in LayoutDirection.Rtl, use AbsoluteCutCornerShape for the layout direction unaware version of this shape.

Parameters
topStart: CornerSize a size of the top start corner
topEnd: CornerSize a size of the top end corner
bottomEnd: CornerSize a size of the bottom end corner
bottomSta