# AbsoluteCutCornerShape

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/AbsoluteCutCornerShape.kt+class:androidx.compose.foundation.shape.AbsoluteCutCornerShape) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0) Common/All
- Cmn

  ```
  class AbsoluteCutCornerShape : 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.AbsoluteCutCornerShape](https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape) |

*** ** * ** ***

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 not 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/CutCornerShape` for the layout direction aware version of this shape.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape#AbsoluteCutCornerShape(androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize,androidx.compose.foundation.shape.CornerSize)( topLeft: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, topRight: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomRight: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize, bottomLeft: 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/AbsoluteCutCornerShape` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape#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/AbsoluteCutCornerShape#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/AbsoluteCutCornerShape#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/AbsoluteCutCornerShape#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape#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/AbsoluteCutCornerShape#toString()()` | Cmn |

| ### Extension functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/PolygonShape` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape.https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape#(androidx.compose.foundation.shape.AbsoluteCutCornerShape).toPolygonShape()()` Converts an `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape` to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/PolygonShape`. | 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

### AbsoluteCutCornerShape

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

```
AbsoluteCutCornerShape(
    topLeft: CornerSize,
    topRight: CornerSize,
    bottomRight: CornerSize,
    bottomLeft: CornerSize
)
```

| Parameters |
|---|---|
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the top left corner |
| `topRight: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the top right corner |
| `bottomRight: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the bottom right corner |
| `bottomLeft: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize` | a size of the bottom left corner |

## Public functions

### copy

Cmn

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

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
```

## Extension functions

### AbsoluteCutCornerShape.toPolygonShape

Cmn 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/PolygonShape.kt+function:toPolygonShape)

```
fun AbsoluteCutCornerShape.toPolygonShape(): PolygonShape
```

Converts an `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape` to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/PolygonShape`.

Corners do not swap with the layout direction.

Note: The resulting outline closely approximates the original shape, but is not pixel-identical because `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/PolygonShape` and `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/AbsoluteCutCornerShape` use different geometry and curve calculations. Avoid comparing them for 1:1 pixel equivalence.