<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
abstract class CornerBasedShape(
    val topStart: CornerSize,
    val topEnd: CornerSize,
    val bottomEnd: CornerSize,
    val bottomStart: CornerSize,
) : Shape, Interpolatable
```


Base class for `Shape`s defined by four `CornerSize`s.

#### Parameters

| | |
| --- | --- |
| topStart | a size of the top start corner |
| topEnd | a size of the top end corner |
| bottomEnd | a size of the bottom end corner |
| bottomStart | a size of the bottom start corner |



## Functions



<h2 id="createoutline-size-topstart-topend-bottomend-bottomstart-layoutdirection">createOutline</h2>

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


Creates `Outline` of this shape for the given `size`.

#### Parameters

| | |
| --- | --- |
| size | the size of the shape boundary. |
| topStart | the resolved size of the top start corner |
| topEnd | the resolved size for the top end corner |
| bottomEnd | the resolved size for the bottom end corner |
| bottomStart | the resolved size for the bottom start corner |
| layoutDirection | the current layout direction. |





<hr class="docs-overload-divider">


<h2 id="copy-topstart-topend-bottomend-bottomstart">copy</h2>

```kotlin
abstract fun copy(
        topStart: CornerSize = this.topStart,
        topEnd: CornerSize = this.topEnd,
        bottomEnd: CornerSize = this.bottomEnd,
        bottomStart: CornerSize = this.bottomStart,
    ): CornerBasedShape
```


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

#### Parameters

| | |
| --- | --- |
| topStart | a size of the top start corner |
| topEnd | a size of the top end corner |
| bottomEnd | a size of the bottom end corner |
| bottomStart | a size of the bottom start corner |





<hr class="docs-overload-divider">


<h2 id="copy-all">copy</h2>

```kotlin
fun copy(all: CornerSize): CornerBasedShape
```


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

#### Parameters

| | |
| --- | --- |
| all | a size to apply for all four corners |