---
title: "CornerRounding"
description: "Defines the radius and smoothness of rounding at a polygon vertex."
type: "class"
lastmod: "2026-10-07"
---
## API Reference

> Source set: Common

```kotlin
public class CornerRounding internal constructor(
    internal val value: Float,
    internal val unit: Int,
    internal val smoothing: Float,
)
```

Defines the radius and smoothness of rounding at a polygon vertex.

- `Unrounded` (`radius = 0`) keeps a sharp corner.
- `smoothing = 0f` rounds the corner with a circular arc.
- `smoothing > 0f` extends symmetric cubic Bézier flanking curves from the circular arc toward
the adjacent edges (`1f` maximizes the flanking curves).

Create instances with `CornerRounding.dp`, `CornerRounding.fraction`, or `Unrounded`.

## Functions

### equals

> Source set: Common

```kotlin
override fun equals(other: Any?): Boolean
```

### hashCode

> Source set: Common

```kotlin
override fun hashCode(): Int
```

### toString

> Source set: Common

```kotlin
override fun toString(): String
```

## Members

### Companion

> Source set: Common

```kotlin
public companion object
```

## Properties

### Unrounded

> Source set: Common

```kotlin
public val Unrounded: CornerRounding = CornerRounding(0f, UnitDp, 0f)
```

Sharp corner with a rounding radius of zero.

## Functions

### dp

> Source set: Common

```kotlin
public fun dp(
            radius: Dp,
            @FloatRange(from = 0.0, to = 1.0) smoothing: Float = 0f,
        ): CornerRounding
```

Creates a [CornerRounding](/jetpack-compose/androidx.compose.foundation/foundation/classes/CornerRounding/api) with a `radius` in `Dp`.

#### Parameters

| | |
| --- | --- |
| radius | corner rounding radius, at least `0.dp` |
| smoothing | transition smoothness from the circular arc to adjacent edges, in `0f..1f` |

#### Throws: IllegalArgumentException

if `radius` is negative/unspecified or [smoothing](#smoothing) is outside `0f..1f`

### fraction

> Source set: Common

```kotlin
public fun fraction(
            @FloatRange(from = 0.0, to = 1.0) fraction: Float,
            @FloatRange(from = 0.0, to = 1.0) smoothing: Float = 0f,
        ): CornerRounding
```

Creates a [CornerRounding](/jetpack-compose/androidx.compose.foundation/foundation/classes/CornerRounding/api) with a radius as a `fraction` of the polygon's size.

For polygons defined with a radius (such as `PolygonShape.regularPolygon`,
`PolygonShape.star`, and `PolygonShapeScope.polygon` with `radius`), the corner radius is
``fraction` * radius`. For polygons defined with custom `vertices`
([PolygonShapeGeometry](/jetpack-compose/androidx.compose.foundation/foundation/classes/PolygonShapeGeometry/api)), which do not have a radius, the corner radius is a `fraction`
of the polygon's smaller dimension (`min(width, height)`).

#### Parameters

| | |
| --- | --- |
| fraction | rounding radius as a fraction of the polygon's size, in `0f..1f` |
| smoothing | transition smoothness from the circular arc to adjacent edges, in `0f..1f` |

#### Throws: IllegalArgumentException

if [fraction](#fraction) or [smoothing](#smoothing) is outside `0f..1f`
