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

CornerBasedShape

abstract class CornerBasedShape : Shape
kotlin.Any
   ↳ androidx.compose.foundation.shape.CornerBasedShape

Base class for Shapes defined by four CornerSizes.

Summary

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

Base class for Shapes defined by four CornerSizes.

Public methods
abstract CornerBasedShape
copy(topStart: CornerSize = this.topStart, topEnd: CornerSize = this.topEnd, bottomEnd: CornerSize = this.bottomEnd, bottomStart: CornerSize = this.bottomStart)

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

CornerBasedShape

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

Outline
createOutline(size: Size, layoutDirection: LayoutDirection, density: Density)

Creates Outline of this shape for the given size.

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

Creates Outline of this shape for the given size.

Properties
CornerSize

a size of the bottom end corner

CornerSize

a size of the bottom start corner

CornerSize

a size of the top end corner

CornerSize

a size of the top start corner

Public constructors

<init>

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

Base class for Shapes defined by four CornerSizes.

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
bottomStart: CornerSize a size of the bottom start corner

Public methods