Google is committed to advancing racial equity for Black communities. See how.

GenericShape

data class GenericShape : Shape
kotlin.Any
   ↳ androidx.ui.foundation.shape.GenericShape

Creates Shape defined by applying the provided builder on a Path.

Summary

Public constructors
<init>(builder: Path.(size: Size) -> Unit)

Creates Shape defined by applying the provided builder on a Path.

Public methods
Outline
createOutline(size: Size, density: Density)

Creates Outline of this shape for the given size.

Public constructors

<init>

GenericShape(builder: Path.(size: Size) -> Unit)

Creates Shape defined by applying the provided builder on a Path.

Parameters
builder: Path.(size: Size) -> Unit the builder lambda to apply on a Path

Public methods

createOutline

fun createOutline(
    size: Size,
    density: Density
): Outline

Creates Outline of this shape for the given size.

Parameters
size: Size the size of the shape boundary.
density: Density the current density of the screen.
Return
Outline of this shape for the given size.