# GenericShape

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

  ```
  class GenericShape : Shape
  ```

*** ** * ** ***

Creates `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` defined by applying the provided `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape#(kotlin.Function3)` on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape#GenericShape(kotlin.Function3)(builder: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` | Cmn |

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape#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 |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/GenericShape#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/GenericShape#hashCode()()` | Cmn |

## Public constructors

### GenericShape

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

```
GenericShape(builder: Path.(size: Size, layoutDirection: LayoutDirection) -> Unit)
```

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the builder lambda to apply on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` |

## Public functions

### createOutline

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

```
open fun createOutline(
    size: Size,
    layoutDirection: LayoutDirection,
    density: Density
): 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/ui/graphics/Shape#createOutline(androidx.compose.ui.geometry.Size,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.unit.Density)`.

| Parameters |
|---|---|
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | the size of the shape boundary. |
| `layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | the current layout direction. |
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | the current density of the screen. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | `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)`. |

### equals

Cmn

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

### hashCode

Cmn

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