# CutCornerShape

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/shape/CutCornerShape.kt+class:androidx.compose.foundation.shape.CutCornerShape) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0) Common/All
- Cmn

  ```
  class CutCornerShape : CornerBasedShape
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.compose.foundation.shape.CornerBasedShape](https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape) ||
|   | ↳ | [androidx.compose.foundation.shape.CutCornerShape](https://developer.android.com/reference/kotlin/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 `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection#Rtl`, use `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape` for the layout direction unaware version of this shape.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#CutCornerShape(androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize)( topStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, topEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize )` | Cmn |

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#copy(androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize)( topStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, topEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize )` Creates a copy of this Shape with a new corner sizes. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#createOutline(androidx.compose.ui.geometry.Size,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.unit.LayoutDirection)( size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, topStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, topEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, bottomEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, bottomStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection )` Creates `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` of this shape for the given `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#createOutline(androidx.compose.ui.geometry.Size,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.unit.LayoutDirection)`. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#lerp(kotlin.Any,kotlin.Float)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Default implementation. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CutCornerShape#toString()()` | Cmn |

| ### Inherited functions |
|---|
| From [androidx.compose.foundation.shape.CornerBasedShape](https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape) |---|---|---| | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#copy(androidx.compose.foundation.shape.CornerSize)(all: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize)` Creates a copy of this Shape with a new corner size. | Cmn | | `final https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#createOutline(androidx.compose.ui.geometry.Size,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.unit.Density)( size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection, density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density )` Creates `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` of this shape for the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape#createOutline(androidx.compose.ui.geometry.Size,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.unit.Density)`. | Cmn | |

| ### Inherited properties |
|---|
| From [androidx.compose.foundation.shape.CornerBasedShape](https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape) |---|---|---| | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#bottomEnd()` a size of the bottom end corner | Cmn | | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#bottomStart()` a size of the bottom start corner | Cmn | | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#topEnd()` a size of the top end corner | Cmn | | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#topStart()` a size of the top start corner | Cmn | |

## Public constructors

### CutCornerShape

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

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

| Parameters |
|---|---|
| `topStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the top start corner |
| `topEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the top end corner |
| `bottomEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the bottom end corner |
| `bottomStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the bottom start corner |

## Public functions

### copy

Cmn

```
open fun copy(
    topStart: CornerSize = this.topStart,
    topEnd: CornerSize = this.topEnd,
    bottomEnd: CornerSize = this.bottomEnd,
    bottomStart: CornerSize = this.bottomStart
): CutCornerShape
```

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

| Parameters |
|---|---|
| `topStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize = this.topStart` | a size of the top start corner |
| `topEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize = this.topEnd` | a size of the top end corner |
| `bottomEnd: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize = this.bottomEnd` | a size of the bottom end corner |
| `bottomStart: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize = this.bottomStart` | a size of the bottom start corner |

### createOutline

Cmn

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

Creates `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` of this shape for the given `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape#createOutline(androidx.compose.ui.geometry.Size,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.unit.LayoutDirection)`.

| Parameters |
|---|---|
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | the size of the shape boundary. |
| `topStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the resolved size of the top start corner |
| `topEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the resolved size for the top end corner |
| `bottomEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the resolved size for the bottom end corner |
| `bottomStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the resolved size for the bottom start corner |
| `layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | the current layout direction. |

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### lerp

Cmn

```
open fun lerp(other: Any?, t: Float): Any?
```

Default implementation. Returns null. Override this to get interpolatable benefits.

### toString

Cmn

```
open fun toString(): String
```